import {
    G as B,
    z as D,
    r,
    R as L,
    T as N,
    A as b,
    H as v,
    aA as x,
    I as l,
    J as e,
    Q as m,
    O as d,
    ax as _,
    P as a,
    aF as I,
    ao as H,
    av as V,
    t as g,
    F as q,
    N as c,
    K as z,
    M as E
} from "./common.modules-5cfe2cf4.js";
import {
    cd as G,
    A as S,
    ce as f,
    b as T,
    g as F,
    _ as U
} from "./page-activity-ActivityDetail-a58ec568.js";
import {
    L as M
} from "./page-activity-DailySignIn-543fff66.js";
import "./page-turntable-assets-d6267459.js";
import "./native/index-2ac88fb8.js";
import "./en-cfd26acf.js";
import "./page-activity-Bonus-3c16c86d.js";
const Q = {
        class: "redeem-container"
    },
    j = {
        class: "redeem-container-header"
    },
    J = {
        class: "redeem-container-header-belly"
    },
    K = {
        alt: ""
    },
    O = {
        class: "redeem-container-content"
    },
    W = {
        class: "redeem-container-receive"
    },
    X = ["placeholder"],
    Y = {
        key: 0
    },
    Z = {
        class: "redeem-container-record"
    },
    ee = {
        class: "redeem-container-record-title"
    },
    te = {
        class: "redeem-container-record-itemsBox"
    },
    se = {
        class: "redeem-container-record-item ar-1px-b"
    },
    oe = {
        class: "redeem-container-record-item-left"
    },
    ae = {
        class: "redeem-container-record-item-right"
    },
    ne = ["src"],
    ie = B({
        __name: "index",
        setup(re) {
            const {
                t: u
            } = D(), h = r(!1), y = L(), w = N(), n = r(w.query.hbcode || ""), C = r(!0), p = b({
                pageSize: 10,
                pageNo: 1,
                startDate: null,
                endDate: null
            }), i = r({
                list: [],
                pageNo: 0,
                totalPage: 0,
                totalCount: 0
            }), P = async () => {
                if (n.value.trim() === "") {
                    await g({
                        message: u("tipPlsEnterCode")
                    });
                    return
                }
                const t = await G({
                    giftCode: n.value
                });
                if (t.code === 0) {
                    q(u("redeemDialogDesc1")), n.value = "", await $();
                    return
                } else await g({
                    message: u(`code${t.msgCode}`),
                    allowHtml: t.msgCode === 1006
                })
            }, $ = async () => {
                const t = await S(f(p));
                t && (i.value.list = t == null ? void 0 : t.data.list)
            };
            return (t, o) => {
                const k = v("NavBar"),
                    R = v("svg-icon"),
                    A = x("lazy");
                return c(), l("div", Q, [e("div", j, [m(k, {
                    title: t.$t("gift"),
                    "left-arrow": "",
                    onClickLeft: o[0] || (o[0] = s => d(y).go(-1))
                }, null, 8, ["title"]), e("div", J, [_(e("img", K, null, 512), [
                    [A, d(T)("main", "gift")]
                ])])]), e("div", O, [e("div", W, [e("p", null, a(t.$t("tipHelloVIP")), 1), e("p", null, a(t.$t("tipWepreparedGift4u")), 1), e("h4", null, a(t.$t("tipPlsEnterRedeemCode")), 1), _(e("input", {
                    type: "text",
                    "auto-complete": "new-password",
                    autocomplete: "off",
                    placeholder: t.$t("tipPlsEnterCode"),
                    "onUpdate:modelValue": o[1] || (o[1] = s => n.value = s)
                }, null, 8, X), [
                    [I, n.value]
                ]), h.value ? (c(), l("h5", Y, a(t.$t("tipPlsBindBankcard")), 1)) : H("v-if", !0), e("button", {
                    onClick: o[2] || (o[2] = s => P())
                }, a(t.$t("receive")), 1)]), e("div", Z, [e("div", ee, [m(R, {
                    name: "giftHistory"
                }), e("span", null, a(t.$t("record")), 1)]), e("div", te, [m(M, {
                    list: i.value.list,
                    "onUpdate:list": o[3] || (o[3] = s => i.value.list = s),
                    "page-query": p,
                    "onUpdate:pageQuery": o[4] || (o[4] = s => p = s),
                    api: d(f),
                    distance: 20,
                    isAutoLoad: C.value
                }, {
                    content: V(() => [(c(!0), l(z, null, E(i.value.list, s => (c(), l("div", {
                        class: "redeem-container-record-items",
                        key: s.reserved
                    }, [e("div", se, [e("div", oe, [e("h5", null, a(t.$t("receiveSuccess")), 1), e("span", null, a(s.addTime), 1)]), e("div", ae, [e("img", {
                        src: d(F)("main", "gold")
                    }, null, 8, ne), e("span", null, a(s.amount), 1)])])]))), 128))]),
                    _: 1
                }, 8, ["list", "page-query", "api", "isAutoLoad"])])])])])
            }
        }
    });
const _e = U(ie, [
    ["__scopeId", "data-v-695ca243"],
    ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/views/main/RedeemGift/index.vue"]
]);
export {
    _e as
    default
};