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