import {
    G as aa,
    z as ka,
    r as c,
    R as ea,
    $ as q,
    C as ba,
    X as ga,
    E as Ca,
    A as Sa,
    H as p,
    I as _,
    Q as i,
    J as a,
    au as k,
    ao as T,
    P as o,
    an as m,
    V as $a,
    N as v,
    K,
    M as Q,
    at as F,
    bG as Ia,
    aA as V,
    O as l,
    aw as Da,
    ax as Na,
    aE as Ra,
    F as Ta,
    w as J,
    ap as ta,
    aB as Wa,
    aC as Ba
} from "./common.modules-af1f85b9.js";
import {
    c as xa,
    W as Aa
} from "./page-wallet-Withdraw-eb0d768a.js";
import {
    a4 as La,
    bv as d,
    A as X,
    dz as Va,
    dV as Z,
    dy as Ha,
    bu as G,
    c as Ua,
    L as H,
    dw as Oa,
    _ as sa,
    g as z
} from "./page-activity-ActivityDetail-09e806d3.js";
import {
    C as Ma
} from "./page-wallet-RechargeHistory-f0467897.js";
import {
    L as ja
} from "./page-activity-Bonus-78dc3749.js";
const Ya = {
        class: "rechargeh__container"
    },
    za = {
        class: "rechargeh__container_header"
    },
    Ga = {
        class: "tabDiv"
    },
    Ea = {
        key: 0,
        class: "c2cType"
    },
    Pa = {
        class: "ar"
    },
    qa = {
        class: "ar-searchbar"
    },
    Ka = {
        class: "rechargeh__container-content__item-header ar-1px-b"
    },
    Qa = {
        class: "rechargeh__container-content__item-body"
    },
    Fa = ["onUpdate:modelValue"],
    Ja = {
        key: 0
    },
    Xa = aa({
        __name: "index",
        setup(I) {
            const {
                t: n
            } = ka(), {
                setLoading: W
            } = La(), f = c(!1), B = ea();

            function w() {
                B.back()
            }
            const y = c([]),
                u = c(),
                h = c(!1),
                g = c(""),
                na = c(!1),
                C = c({}),
                U = c(""),
                D = c(!1),
                O = c(!1),
                la = async () => {
                    var s, t;
                    if (!O.value) try {
                        O.value = !0, await X(Oa({
                            withdrawId: (s = C.value) == null ? void 0 : s.withdrawID,
                            smsCode: U.value,
                            categoryId: 2
                        })) && (D.value = !1, Ta({
                            type: "success",
                            message: n("verifySuccess"),
                            duration: 2e3
                        }), (t = u.value) == null || t.resetRefresh())
                    } finally {
                        O.value = !1
                    }
                },
                oa = s => {
                    C.value = Object.assign({}, s.upiAccountInfo || {}, {
                        withdrawID: s.withdrawID
                    }), D.value = !0
                },
                ca = async ({
                    selectedOptions: s
                }) => {
                    var t;
                    h.value = !1, g.value = s[0].key, r.state = s[0].value, (t = u.value) == null || t.resetRefresh()
                },
                M = c(Z),
                S = c();
            let j = c([]);
            const $ = c(!1),
                x = c(-1),
                N = c(null),
                ra = q(x, (s, t) => {
                    g.value = d.RechargeState[0].key, r.state = d.RechargeState[0].value, r.type = j.value[s].withdrawID, r.type == 20 ? (S.value = [{
                        key: n("withdrawStatem1"),
                        value: -1
                    }, {
                        key: n("c2cState0"),
                        value: 0
                    }, {
                        key: n("c2cState1"),
                        value: 1
                    }, {
                        key: n("c2cState2"),
                        value: 2
                    }, {
                        key: n("c2cState3"),
                        value: 3
                    }, {
                        key: n("c2cState4"),
                        value: 4
                    }, {
                        key: n("c2cTip9"),
                        value: 5
                    }, {
                        key: n("c2cState6"),
                        value: 6
                    }, {
                        key: n("c2cState7"),
                        value: 7
                    }, {
                        key: n("c2cState8"),
                        value: 8
                    }, {
                        key: n("c2cState9"),
                        value: 9
                    }], g.value = d.C2cState[0].key, r.state = d.C2cState[0].value, r.category = -1, M.value = Ha, $.value = !0, r.type = -1) : (clearInterval(N.value), S.value = d.WithdrawState, delete r.category, $.value = !1, M.value = Z), $a(() => {
                        var R;
                        (R = u.value) == null || R.resetRefresh()
                    })
                });

            function ia() {
                N.value = setInterval(() => {
                    var s;
                    (s = u.value) == null || s.resetRefresh()
                }, 1e4)
            }
            q(() => y.value, s => {
                $.value && s.findIndex(t => t.state === 11 || t.state === 12) != -1 ? (clearInterval(N.value), ia()) : clearInterval(N.value)
            });
            async function da() {
                W(!0);
                const s = await X(Va());
                if (s) {
                    let t = s == null ? void 0 : s.data.withdrawlist;
                    t.unshift({
                        withdrawID: -1,
                        name: n("all"),
                        isAdd: 0
                    }), j.value = t
                }
                W(!1)
            }
            ba(async () => {
                setTimeout(() => {
                    g.value = n("all"), S.value = d.WithdrawState
                }), await da()
            }), ga(() => {
                ra()
            }), Ca(() => {
                clearInterval(N.value)
            });

            function ua() {
                h.value = !0, na.value = !0
            }
            const A = c();
            async function va() {
                var t;
                let s = A.value.endDateValue !== "" ? `${A.value.endDateValue} 23:59:59` : "";
                r.startDate = J(A.value.startDateValue).format("YYYY-MM-DD HH:mm:ss"), r.endDate = J(s).format("YYYY-MM-DD HH:mm:ss"), (t = u.value) == null || t.resetRefresh()
            }
            const r = Sa({
                    startDate: "",
                    endDate: "",
                    state: d.RechargeState[0].value,
                    type: -1
                }),
                E = s => {
                    var t;
                    r.type = s, s == 1 ? S.value = [{
                        key: n("withdrawStatem1"),
                        value: -1
                    }, {
                        key: n("c2cState0"),
                        value: 0
                    }, {
                        key: n("c2cState1"),
                        value: 1
                    }, {
                        key: n("c2cState2"),
                        value: 2
                    }, {
                        key: n("c2cState3"),
                        value: 3
                    }, {
                        key: n("c2cState8"),
                        value: 8
                    }, {
                        key: n("c2cState9"),
                        value: 9
                    }] : S.value = [{
                        key: n("withdrawStatem1"),
                        value: -1
                    }, {
                        key: n("c2cState4"),
                        value: 4
                    }, {
                        key: n("c2cTip9"),
                        value: 5
                    }, {
                        key: n("c2cState6"),
                        value: 6
                    }, {
                        key: n("c2cState7"),
                        value: 7
                    }], g.value = d.C2cState[0].key, r.state = d.C2cState[0].value, (t = u.value) == null || t.resetRefresh()
                };
            return (s, t) => {
                const R = p("NavBar"),
                    P = p("svg-icon"),
                    pa = p("van-tab"),
                    _a = p("van-tabs"),
                    wa = p("ArSelect"),
                    ya = p("van-picker"),
                    ha = p("van-popup"),
                    ma = p("van-button"),
                    fa = p("van-dialog");
                return v(), _("div", Ya, [i(R, {
                    class: "white",
                    title: s.$t("withdrawRecords"),
                    "left-arrow": "",
                    onClickLeft: w
                }, null, 8, ["title"]), a("div", za, [i(_a, {
                    class: "onlineGames__container-tabBar",
                    active: x.value,
                    "onUpdate:active": t[0] || (t[0] = e => x.value = e),
                    type: "card",
                    ref: "tabsRef",
                    ellipsis: "",
                    "swipe-threshold": 3
                }, {
                    default: k(() => [(v(!0), _(K, null, Q(l(j), (e, L) => (v(), F(pa, {
                        key: L
                    }, Ia({
                        _: 2
                    }, [e.withdrawID === -1 ? {
                        name: "title",
                        fn: k(() => [a("div", Ga, [i(P, {
                            name: "all"
                        }), V(" " + o(e.name), 1)])]),
                        key: "0"
                    } : {
                        name: "title",
                        fn: k(() => [a("div", {
                            class: "tabDiv"
                        }, [x.value == L ? (v(), _("img", {
                            key: 0,
                            src: e.withAfterImgUrl
                        }, null, 8, ["src"])) : (v(), _("img", {
                            key: 1,
                            src: e.withBeforeImgUrl
                        }, null, 8, ["src"])), V(" " + o(e.name), 1)])]),
                        key: "1"
                    }]), 1024))), 128))]),
                    _: 1
                }, 8, ["active"]), $.value ? (v(), _("div", Ea, [a("div", {
                    class: T({
                        active: r.type == 1
                    }),
                    onClick: t[1] || (t[1] = e => E(1))
                }, o(s.$t("inTransaction")), 3), a("div", {
                    class: T({
                        active: r.type == 2
                    }),
                    onClick: t[2] || (t[2] = e => E(2))
                }, o(s.$t("completed")), 3)])) : m("v-if", !0), a("div", Pa, [a("div", qa, [i(wa, {
                    onClickSelect: ua,
                    selectName: g.value
                }, null, 8, ["selectName"]), m("日期选择组件"), i(Ma, {
                    ref_key: "calendar",
                    ref: A,
                    onConfirm: va
                }, null, 512)])])]), i(ha, {
                    show: h.value,
                    "onUpdate:show": t[4] || (t[4] = e => h.value = e),
                    round: "",
                    position: "bottom"
                }, {
                    default: k(() => [i(ya, {
                        "columns-field-names": {
                            text: "key",
                            value: "value",
                            children: "children"
                        },
                        columns: S.value,
                        onCancel: t[3] || (t[3] = e => h.value = !1),
                        onConfirm: ca
                    }, null, 8, ["columns"])]),
                    _: 1
                }, 8, ["show"]), m(" 提现记录 "), i(ja, {
                    list: y.value,
                    "onUpdate:list": t[5] || (t[5] = e => y.value = e),
                    "page-query": r,
                    "onUpdate:pageQuery": t[6] || (t[6] = e => r = e),
                    api: M.value,
                    distance: 100,
                    ref_key: "listRef",
                    ref: u,
                    "is-auto-load": f.value
                }, {
                    content: k(() => [a("div", {
                        class: T(["rechargeh__container-content", {
                            isC2c: $.value,
                            empty: y.value.length === 0
                        }])
                    }, [$.value ? (v(), F(xa, {
                        key: 0,
                        list: y.value
                    }, null, 8, ["list"])) : (v(!0), _(K, {
                        key: 1
                    }, Q(y.value, (e, L) => (v(), _("div", {
                        class: "rechargeh__container-content__item",
                        key: L
                    }, [m(' <div class="rechargeh__container-content__item-header ar-1px-b" @click="onToDetail(item.state)"> '), a("div", Ka, [a("span", null, o(s.$t("withdraw")), 1), m(" <span>{{ item.withdrawName }}</span> "), a("span", {
                        class: T({
                            stateR: e.state === 0,
                            stateG: e.state === 1,
                            stateReject: e.state === 2
                        })
                    }, [V(o(l(G)(l(d).WithdrawState, e.state)) + " ", 1), m(' <van-icon name="arrow" /> ')], 2)]), a("div", Qa, [a("div", null, [a("span", null, o(s.$t("amount")), 1), a("span", null, o(l(Ua)(e.price)), 1)]), a("div", null, [a("span", null, o(s.$t("type")), 1), a("span", null, o(e.withdrawName), 1)]), a("div", null, [a("span", null, o(s.$t("time")), 1), a("span", null, o(e.addTime), 1)]), a("div", null, [a("span", null, o(s.$t("orderNo")), 1), a("span", null, o(e.withdrawNumber), 1), i(P, {
                        onClick: Y => l(H)(e.withdrawNumber.toString()),
                        name: "copy"
                    }, null, 8, ["onClick"])]), a("div", null, [a("span", null, o(s.$t("remarksContent")), 1)]), a("div", null, [m(" <span>{{ $t('remarksContent') }}</span> "), Da(a("textarea", {
                        class: "textarea",
                        name: "remark",
                        cols: "30",
                        rows: "10",
                        readonly: !0,
                        "onUpdate:modelValue": Y => e.remark = Y
                    }, null, 8, Fa), [
                        [Na, (e == null ? void 0 : e.remark) && (e == null ? void 0 : e.remark.trim()) != ""],
                        [Ra, e.remark]
                    ])]), e.needKycConnect && e.state === 3 ? (v(), _("div", Ja, [i(ma, {
                        size: "small",
                        onClick: Y => oa(e),
                        type: "danger",
                        block: ""
                    }, {
                        default: k(() => [V(o(s.$t("verifyOpt")), 1)]),
                        _: 2
                    }, 1032, ["onClick"])])) : m("v-if", !0)])]))), 128))], 2)]),
                    _: 1
                }, 8, ["list", "page-query", "api", "is-auto-load"]), i(fa, {
                    show: D.value,
                    "onUpdate:show": t[9] || (t[9] = e => D.value = e),
                    showConfirmButton: !1,
                    width: "fit-content",
                    "lazy-render": ""
                }, {
                    default: k(() => [i(Aa, {
                        withdrawalId: C.value.withdrawID,
                        bank: C.value.bankCode,
                        upi: C.value.accountNo,
                        mobile: C.value.mobileNO,
                        code: U.value,
                        "onUpdate:code": t[7] || (t[7] = e => U.value = e),
                        onConfirm: la,
                        onClose: t[8] || (t[8] = e => D.value = !1)
                    }, null, 8, ["withdrawalId", "bank", "upi", "mobile", "code"])]),
                    _: 1
                }, 8, ["show"])])
            }
        }
    });
const Za = sa(Xa, [
        ["__scopeId", "data-v-e4760c44"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/views/wallet/WithdrawHistory/index.vue"]
    ]),
    $e = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: Za
    }, Symbol.toStringTag, {
        value: "Module"
    })),
    b = I => (Wa("data-v-9bca0648"), I = I(), Ba(), I),
    ae = {
        class: "WHD__container"
    },
    ee = ["src"],
    te = {
        class: "WHD__container-body"
    },
    se = {
        class: "container"
    },
    ne = {
        class: "top ar-1px-b"
    },
    le = ["src"],
    oe = b(() => a("span", null, "Bank Card 提现", -1)),
    ce = ta('<div class="item" data-v-9bca0648><div data-v-9bca0648><span data-v-9bca0648>订单金额</span><span class="yellow" data-v-9bca0648>$8888.88</span></div><div data-v-9bca0648><span data-v-9bca0648>扣除金额</span><span class="black" data-v-9bca0648>$8888.88</span></div><div data-v-9bca0648><span data-v-9bca0648>到账金额</span><span class="black" data-v-9bca0648>$8888.88</span></div><div data-v-9bca0648><span data-v-9bca0648>订单时间</span><span data-v-9bca0648>2022-06-01</span></div></div>', 1),
    re = {
        class: "mImg"
    },
    ie = ["src"],
    de = {
        class: "item"
    },
    ue = b(() => a("span", null, "UTR", -1)),
    ve = b(() => a("span", null, "202246892345", -1)),
    pe = b(() => a("span", null, "订单号", -1)),
    _e = b(() => a("span", null, "2022102518543345000113", -1)),
    we = b(() => a("span", null, "支付时间", -1)),
    ye = b(() => a("span", null, "2022-06-20 15：15：16", -1)),
    he = ta('<div class="containerB" data-v-9bca0648><div class="top ar-1px-b" data-v-9bca0648><!-- &lt;img :src=&quot;getIcons(&#39;wallet/withdraw/withdrawHistory&#39;, &#39;bc&#39;)&quot; /&gt; --><span data-v-9bca0648>银行名称</span></div><div class="item" data-v-9bca0648><div data-v-9bca0648><span class="red" data-v-9bca0648>Account Name</span><span data-v-9bca0648>SAWARN TELECOM</span></div><div data-v-9bca0648><span class="red" data-v-9bca0648>Bank Number</span><span data-v-9bca0648>0005123100000315</span></div><div data-v-9bca0648><span class="red" data-v-9bca0648>Order Number</span><span data-v-9bca0648>2022102518543345000113</span></div></div></div>', 1),
    me = aa({
        __name: "index",
        setup(I) {
            const n = ea();

            function W() {
                n.back()
            }
            const f = history.state.paramValue || 0;
            return (B, w) => {
                const y = p("NavBar"),
                    u = p("svg-icon");
                return v(), _("div", ae, [i(y, {
                    title: "",
                    "left-arrow": "",
                    onClickLeft: W,
                    classN: `bg${l(f)}`
                }, null, 8, ["classN"]), a("div", {
                    class: T(["WHD__container-header", `bg${l(f)}`])
                }, [a("div", null, [a("h1", null, o(B.$t(l(G)(l(d).WithdrawState, l(f)))), 1), a("span", null, o(B.$t(l(G)(l(d).WStateCorrelationT, l(f)))), 1)]), a("img", {
                    src: l(z)("wallet/withdraw/withdrawHistory/state", `${l(f)}`)
                }, null, 8, ee)], 2), a("div", te, [a("div", se, [a("div", ne, [a("img", {
                    src: l(z)("wallet/withdraw/withdrawHistory", "bc")
                }, null, 8, le), oe]), ce, a("div", re, [a("img", {
                    src: l(z)("wallet/withdraw/withdrawHistory", "moonBar")
                }, null, 8, ie)]), a("div", de, [a("div", null, [ue, ve, i(u, {
                    onClick: w[0] || (w[0] = h => l(H)("1414"))
                })]), a("div", null, [pe, _e, i(u, {
                    onClick: w[1] || (w[1] = h => l(H)("1414"))
                })]), a("div", null, [we, ye, i(u, {
                    onClick: w[2] || (w[2] = h => l(H)("1414"))
                })])])]), he])])
            }
        }
    });
const fe = sa(me, [
        ["__scopeId", "data-v-9bca0648"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/views/wallet/WithdrawHistory/WithdrawHistoryDetail/index.vue"]
    ]),
    Ie = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: fe
    }, Symbol.toStringTag, {
        value: "Module"
    }));
export {
    Ie as a, $e as i
};