import {
    G as x,
    z as A,
    R as C,
    r as I,
    H as a,
    I as _,
    Q as s,
    O as d,
    J as i,
    av as m,
    N as v,
    K as P,
    M as N,
    ap as y,
    ax as B,
    ay as R,
    u as U
} from "./common.modules-5cfe2cf4.js";
import {
    G as V,
    b as $,
    A as z,
    bN as G,
    _ as E
} from "./page-activity-ActivityDetail-a58ec568.js";
import "./page-turntable-assets-d6267459.js";
import "./native/index-2ac88fb8.js";
import "./en-cfd26acf.js";
const F = {
        class: "avatar-container"
    },
    L = {
        class: "avatar-container-content"
    },
    j = ["src"],
    p = !0,
    D = x({
        __name: "index",
        setup(H) {
            const {
                t: f
            } = A(), c = V(), n = c.getUserInfo, l = C(), r = I(n.userPhoto);
            async function g(e) {
                if (r.value = (e + 1).toString(), e < 0) return U({
                    message: f("tipSelectPls")
                }), !1;
                await z(G({
                    userPhoto: (e + 1).toString()
                })) && (n.userPhoto = (e + 1).toString(), c.setUserInfo({ ...n
                }), l.go(-1))
            }
            return (e, t) => {
                const h = a("NavBar"),
                    k = a("van-checkbox"),
                    w = a("van-grid-item"),
                    S = a("van-grid");
                return v(), _("div", F, [s(h, {
                    title: e.$t("changeAvatar"),
                    "left-arrow": "",
                    onClickLeft: t[0] || (t[0] = b => d(l).go(-1))
                }, null, 8, ["title"]), i("div", L, [s(S, {
                    border: !1,
                    "column-num": 3,
                    gutter: 10
                }, {
                    default: m(() => [(v(), _(P, null, N(20, (b, o) => s(w, {
                        onClick: u => g(o)
                    }, {
                        default: m(() => [i("img", {
                            class: y(r.value === (o + 1).toString() ? "active" : ""),
                            src: d($)("main/Avatar", `${o+1}`)
                        }, null, 10, j), B(i("div", null, [s(k, {
                            modelValue: p,
                            "onUpdate:modelValue": t[1] || (t[1] = u => p = u),
                            "icon-size": "20px"
                        })], 512), [
                            [R, r.value === (o + 1).toString()]
                        ])]),
                        _: 2
                    }, 1032, ["onClick"])), 64))]),
                    _: 1
                })])])
            }
        }
    });
const T = E(D, [
    ["__scopeId", "data-v-0cd6dac4"],
    ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/views/main/Avatar/index.vue"]
]);
export {
    T as
    default
};