import {
    G as N,
    R as P,
    r as n,
    W as B,
    H as u,
    I as d,
    J as t,
    aB as w,
    P as _,
    Q as i,
    ao as y,
    au as A,
    ap as v,
    N as s
} from "./common.modules-f9fa5dc7.js";
import {
    E as b
} from "./page-activity-Bonus-f5229d51.js";
import {
    M as z
} from "./MayrecordList-fb11b7c3.js";
import {
    A as D,
    eR as x,
    _ as E
} from "./page-activity-ActivityDetail-0d51a056.js";
const H = {
        class: "MyGameRecord__C"
    },
    S = {
        key: 0,
        class: "MyGameRecord__C-head"
    },
    V = {
        class: "MyGameRecord__C-body"
    },
    q = {
        key: 1,
        class: "MyGameRecord__C-body-empty"
    },
    F = {
        key: 1,
        class: "MyGameRecord__C-foot"
    },
    I = {
        class: "MyGameRecord__C-foot-page"
    },
    L = N({
        __name: "MyGameRecord",
        props: {
            typeid: {
                type: Number,
                required: !0
            },
            goPathName: {
                type: String,
                required: !0
            },
            hasHead: {
                type: Boolean,
                required: !0,
                default: !0
            }
        },
        setup(g, {
            expose: f
        }) {
            const m = g,
                R = P(),
                l = n(4),
                C = n(20),
                a = n(1),
                c = n([]),
                h = o => {
                    R.push({
                        name: o
                    })
                },
                G = () => {
                    a.value--, r()
                },
                M = () => {
                    a.value++, r()
                },
                r = async (o = !1) => {
                    if (m.typeid == null) return;
                    o && (a.value = 1);
                    const e = await D(x({
                        pageSize: C.value,
                        pageNo: a.value,
                        typeId: m.typeid
                    }));
                    c.value = (e == null ? void 0 : e.data.list) || [], l.value = (e == null ? void 0 : e.data.totalPage) || 0
                };
            return f({
                getData: r
            }), B(() => {
                r()
            }), (o, e) => {
                const k = u("svg-icon"),
                    p = u("van-icon");
                return s(), d("div", H, [o.hasHead ? (s(), d("div", S, [t("div", {
                    class: "MyGameRecord__C-head-moreB", style: "display: none;",
                    onClick: e[0] || (e[0] = $ => h(o.goPathName))
                }, [w(_(o.$t("more")) + " ", 1), i(k, {
                    name: "rightCircle"
                })])])) : y("v-if", !0), t("div", V, [c.value.length ? (s(), A(z, {
                    key: 0,
                    mayrecord: c.value
                }, null, 8, ["mayrecord"])) : (s(), d("div", q, [i(b)]))]), c.value.length ? (s(), d("div", F, [t("div", {
                    class: v(["MyGameRecord__C-foot-previous", {
                        disabled: a.value <= 1
                    }]),
                    onClick: G
                }, [i(p, {
                    name: "arrow-left",
                    class: "MyGameRecord__C-icon",
                    size: "20"
                })], 2), t("div", I, _(a.value) + "/" + _(l.value), 1), t("div", {
                    class: v(["MyGameRecord__C-foot-next", {
                        disabled: a.value >= l.value
                    }]),
                    onClick: M
                }, [i(p, {
                    name: "arrow",
                    class: "MyGameRecord__C-icon",
                    size: "20"
                })], 2)])) : y("v-if", !0)])
            }
        }
    });
const W = E(L, [
    ["__scopeId", "data-v-36ddca8e"],
    ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/AllLotteryGames/FD/MyGameRecord.vue"]
]);
export {
    W as F
};