import {
    G as x,
    B as y,
    N as p,
    I as m,
    J as t,
    az as F,
    P as l,
    ao as D,
    z as B,
    r as I,
    H as P,
    aA as T,
    K as A,
    M as j,
    Q as w,
    av as W,
    aB as M,
    O as _,
    ap as O,
    ax as $,
    R as V,
    C as G
} from "./common.modules-f9fa5dc7.js";
import {
    r as H
} from "./page-activity-DailySignIn-feddb04c.js";
import {
    _ as C,
    m as L,
    n as E,
    c as R,
    g as N,
    b as J
} from "./page-activity-ActivityDetail-0d51a056.js";
const K = {
        key: 0,
        class: "step"
    },
    Q = x({
        __name: "Progress",
        props: {
            strokeWidth: {
                type: Number,
                default: 12
            },
            total: {
                type: Number,
                default: 0
            },
            numerical: {
                type: Number,
                default: 0
            },
            color: {
                type: String,
                default: "var(--text_color_L4)"
            },
            trackColor: {
                type: String,
                default: "var(--bg_color_L1)"
            },
            isShowStep: {
                type: Boolean,
                default: !0
            }
        },
        setup(f) {
            const e = f,
                u = y(() => ({
                    background: e.trackColor,
                    height: `${e.strokeWidth}px`,
                    "border-radius": `${e.strokeWidth}px`
                })),
                r = y(() => {
                    let n = "0";
                    return e.numerical == 0 || e.total == 0 ? n = "0" : e.numerical > e.total ? n = "100" : n = String((e.numerical / e.total * 100).toFixed(2)), {
                        background: e.color,
                        width: `${n}%`,
                        height: `${e.strokeWidth}px`,
                        "border-radius": `${e.strokeWidth}px`
                    }
                }),
                g = y(() => `${e.numerical}/${e.total}`);
            return (n, k) => (p(), m("div", {
                class: "progress",
                style: F(u.value)
            }, [t("div", {
                class: "line",
                style: F(r.value)
            }, null, 4), f.isShowStep ? (p(), m("div", K, l(g.value), 1)) : D("v-if", !0)], 4))
        }
    });
const U = C(Q, [
        ["__scopeId", "data-v-bff59ba2"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/common/Progress.vue"]
    ]),
    q = {
        class: "head"
    },
    X = {
        class: "title"
    },
    Y = {
        class: "orange"
    },
    Z = {
        class: "description"
    },
    ee = {
        class: "foot"
    },
    te = ["onClick"],
    se = {
        class: "dialog-wrapper"
    },
    ae = {
        class: "dialog-title"
    },
    re = {
        class: "dialog-content"
    },
    oe = x({
        __name: "listItem",
        props: {
            list: {
                type: Array,
                default: () => [{
                    rewardAmount: 123
                }]
            },
            isRule: {
                type: Boolean,
                default: !1
            }
        },
        emits: ["gorecharge"],
        setup(f, {
            emit: e
        }) {
            const {
                t: u
            } = B(), r = I(!1), g = I("");
            let n = !1;
            const {
                receiveFirstRechargeReward: k,
                ActiveSotre: S
            } = L(), {
                closeFirstSave: b
            } = E(), d = (o, s) => {
                const {
                    canReceive: c,
                    isFinshed: i
                } = o;
                if (!c) return "n2" + (s ? " rule" : "");
                if (c && !i) return "n1" + (s ? " rule" : "");
                if (i) return "n3" + (s ? " rule" : "");
                if (!i) return "n2" + (s ? " rule" : "")
            }, v = o => {
                const {
                    canReceive: s,
                    isFinshed: c
                } = o;
                return u(s ? c ? "claimed" : "receive" : "torecharge")
            }, h = async o => {
                const {
                    canReceive: s,
                    isFinshed: c
                } = o;
                if (!s) return e("gorecharge");
                if (c || n) return;
                n = !0;
                const i = await k(o.id);
                n = !1, i && (S.value.receiveAmount = o.rewardAmount, S.value.showReceiveDialog = !0, b())
            };
            return (o, s) => {
                const c = P("van-dialog"),
                    i = T("lazy");
                return p(), m(A, null, [(p(!0), m(A, null, j(f.list, (a, z) => (p(), m("div", {
                    key: z,
                    class: "first_list-item"
                }, [t("div", q, [t("div", X, [M(l(o.$t("firstSave")), 1), t("span", null, l(a.rechargeAmount), 1)]), t("div", Y, "+ " + l(_(R)(a.rewardAmount)), 1)]), t("div", Z, l(o.$t("firstSaveT", [a.rechargeAmount, a.rewardAmount])), 1), t("div", ee, [w(U, {
                    "stroke-width": 16,
                    color: "var(--norm_secondary-color)",
                    total: a.rechargeAmount,
                    numerical: a.canReceive ? a.rechargeAmount : 0
                }, null, 8, ["total", "numerical"]), t("div", {
                    class: O(["btn", [d(a, f.isRule)]]),
                    onClick: ue => h(a)
                }, l(v(a)), 11, te)])]))), 128)), w(c, {
                    show: r.value,
                    "onUpdate:show": s[2] || (s[2] = a => r.value = a),
                    "show-confirm-button": !1,
                    className: "noOverHidden"
                }, {
                    default: W(() => [t("div", se, [$(t("img", null, null, 512), [
                        [i, _(N)("public", "succeed")]
                    ]), t("div", ae, l(o.$t("awardsReceived")), 1), t("div", re, [$(t("img", null, null, 512), [
                        [i, _(N)("wallet", "balance")]
                    ]), t("span", null, l(_(R)(g.value)), 1)]), t("div", {
                        class: "dialog-btn",
                        onClick: s[0] || (s[0] = a => r.value = !1)
                    }, l(o.$t("confirm")), 1), t("div", {
                        class: "dialog-footer",
                        onClick: s[1] || (s[1] = a => r.value = !1)
                    }, [$(t("img", null, null, 512), [
                        [i, _(J)("activity/DailyTask", "close")]
                    ])])])]),
                    _: 1
                }, 8, ["show"])], 64)
            }
        }
    });
const ne = C(oe, [
        ["__scopeId", "data-v-48dabef8"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Activity/FirstRecharge/listItem.vue"]
    ]),
    ie = {
        class: "first_list"
    },
    le = x({
        __name: "index",
        setup(f) {
            const {
                ActiveSotre: e,
                getFirstRechargeList: u
            } = L(), {
                t: r
            } = B(), g = V(), n = y(() => {
                var d;
                return (d = e.value.FirstRechargeList) != null && d.length ? e.value.FirstRechargeList.reduce((v, h) => Math.max(v.rewardAmount || v, h.rewardAmount)) : "0"
            }), k = sessionStorage.getItem("fa1") || "1.00", S = y(() => [r("firstSave1", [R(n.value)]), r("firstSave2"), r("firstSave3"), r("firstSave4", [k]), r("firstSave5"), r("firstSave6")]), b = () => {
                g.push({
                    name: "Recharge"
                })
            };
            return G(() => {
                u()
            }), (d, v) => {
                const h = P("NavBar");
                return p(), m(A, null, [w(h, {
                    title: d.$t("firstSaveTitle"),
                    "left-arrow": "",
                    onClickLeft: v[0] || (v[0] = o => _(g).go(-1))
                }, null, 8, ["title"]), t("div", ie, [w(ne, {
                    list: _(e).FirstRechargeList,
                    onGorecharge: b
                }, null, 8, ["list"])]), w(H, {
                    name: d.$t("firstSaveRule"),
                    tiplist: S.value
                }, null, 8, ["name", "tiplist"])], 64)
            }
        }
    });
const ce = C(le, [
        ["__scopeId", "data-v-c0418dcc"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/views/activity/FirstRecharge/index.vue"]
    ]),
    fe = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: ce
    }, Symbol.toStringTag, {
        value: "Module"
    }));
export {
    ne as f, fe as i
};