import {
    G as O,
    aT as M,
    z as q,
    r as _,
    $ as S,
    Y as F,
    W as J,
    H as K,
    N as o,
    I as t,
    J as e,
    K as Q,
    M as Z,
    a$ as U,
    ap as n,
    P as a,
    aB as b,
    O as c,
    ao as g,
    Q as k,
    aC as X,
    aD as x
} from "./common.modules-5cfe2cf4.js";
import {
    q as L,
    r as ss,
    E as es,
    s as ls
} from "./page-saasLottery-D5-2f97b5a2.js";
import {
    c as p,
    _ as as
} from "./page-activity-ActivityDetail-a58ec568.js";
import "./page-activity-Bonus-3c16c86d.js";
import "./page-turntable-assets-d6267459.js";
import "./native/index-2ac88fb8.js";
import "./en-cfd26acf.js";
const T = m => (X("data-v-921618b9"), m = m(), x(), m),
    os = {
        class: "my_r"
    },
    ts = {
        class: "my_r-body"
    },
    is = {
        key: 0,
        class: "list"
    },
    ns = ["onClick"],
    rs = {
        class: "list-item-l"
    },
    cs = {
        class: "list-item-m"
    },
    ds = {
        class: "list-item-m-top"
    },
    us = T(() => e("path", {
        d: "M5.21907 7.57895C4.89494 8.14035 4.08463 8.14035 3.7605 7.57895L0.114077 1.26316C-0.210049 0.701754 0.195109 -5.66721e-08 0.843362 0L8.13621 6.37561e-07C8.78446 6.94233e-07 9.18962 0.701755 8.86549 1.26316L5.21907 7.57895Z",
        fill: "#323536"
    }, null, -1)),
    _s = [us],
    vs = {
        class: "list-item-m-bottom"
    },
    ps = {
        key: 0,
        class: "list-detail"
    },
    ms = {
        class: "list-detail-text"
    },
    hs = {
        class: "list-detail-line"
    },
    ys = ["onClick"],
    gs = T(() => e("svg", {
        width: "40",
        height: "40",
        viewBox: "0 0 40 40",
        fill: "none",
        xmlns: "http://www.w3.org/2000/svg"
    }, [e("path", {
        d: "M13 12V6H34V29H28",
        stroke: "#929292",
        "stroke-width": "2",
        "stroke-linejoin": "round"
    }), e("rect", {
        x: "6",
        y: "12",
        width: "22",
        height: "22",
        stroke: "#929292",
        "stroke-width": "2",
        "stroke-linejoin": "round"
    })], -1)),
    fs = {
        class: "list-detail-line"
    },
    ks = {
        class: "list-detail-line"
    },
    ws = {
        class: "list-detail-line"
    },
    $s = {
        class: "list-detail-line"
    },
    Bs = {
        class: "red"
    },
    Ns = {
        class: "list-detail-line"
    },
    Ms = {
        class: "list-detail-line"
    },
    Ss = {
        key: 0
    },
    bs = {
        class: "list-inlineB"
    },
    Ls = {
        key: 0,
        class: "list-inlineB violet"
    },
    Ts = {
        key: 1
    },
    Rs = {
        class: "list-detail-line"
    },
    Vs = {
        class: "list-detail-line"
    },
    As = {
        key: 1
    },
    Cs = {
        class: "list-detail-line"
    },
    Ds = {
        key: 1
    },
    Hs = {
        class: "list-detail-line"
    },
    Is = {
        key: 1,
        class: "my_r-body-empty"
    },
    zs = {
        key: 0,
        class: "my_r-foot"
    },
    Ps = {
        class: "my_r-foot-page"
    },
    Ys = O({
        __name: "myRecord",
        setup(m) {
            const R = M("trxWinHook"),
                {
                    trigger: w,
                    gameCode: V,
                    update: A
                } = R,
                C = M("betV"),
                {
                    t: r
                } = q(),
                f = _(4),
                D = _(20),
                d = _(1),
                h = _([]),
                H = () => {
                    d.value--, u()
                },
                I = () => {
                    d.value++, u()
                },
                z = s => {
                    switch (s) {
                        case "BigSmall_Small":
                            return r("small");
                        case "BigSmall_Big":
                            return r("big");
                        case "Color_Green":
                            return r("green");
                        case "Color_Violet":
                            return r("purpleColor");
                        case "Color_Red":
                            return r("redColor");
                        default:
                            return s
                    }
                },
                P = {
                    Big: {
                        name: r("betBig"),
                        code: "Big"
                    },
                    Small: {
                        name: r("betSmall"),
                        code: "Small"
                    }
                },
                u = async () => {
                    const {
                        result: s,
                        data: i
                    } = await ls({
                        pageSize: D.value,
                        pageNo: d.value,
                        gameCode: V.value
                    });
                    s && (h.value = (i == null ? void 0 : i.list) || [], f.value = (i == null ? void 0 : i.totalPage) || 0)
                },
                v = _(-1),
                $ = s => s ? s == null ? void 0 : s.split("_")[1] : "",
                Y = s => {
                    var i;
                    return s ? (s == null ? void 0 : s.split("_")[0]) == "Color" ? " " : ["Big", "Small"].includes(s == null ? void 0 : s.split("_")[1]) ? (i = P[s == null ? void 0 : s.split("_")[1]]) == null ? void 0 : i.name : s == null ? void 0 : s.split("_")[1] : ""
                },
                j = s => {
                    switch (s % 2) {
                        case 1:
                            return r("greenColor");
                        default:
                            return r("redColor")
                    }
                },
                E = s => {
                    switch (s % 2) {
                        case 1:
                            return "green";
                        default:
                            return "red"
                    }
                },
                W = s => {
                    v.value == s ? v.value = -1 : v.value = s
                },
                B = _(!1);
            return S(C, () => {
                u()
            }), F(() => {
                B.value = !0, w.reset()
            }), J(() => {
                B.value = !1, u(), w.on(() => {
                    u()
                })
            }), S(A, () => {
                d.value = 1, u()
            }), (s, i) => {
                const N = K("van-icon");
                return o(), t("div", os, [e("div", ts, [h.value.length ? (o(), t("div", is, [(o(!0), t(Q, null, Z(h.value, (l, y) => (o(), t("div", {
                    key: y
                }, [e("div", {
                    class: "list-item",
                    onClick: U(G => W(y), ["stop", "prevent"])
                }, [e("div", rs, [e("div", {
                    class: n(["list-item-l-" + $(l.betContent).toLocaleLowerCase()])
                }, a(Y(l.betContent)), 3)]), e("div", cs, [e("div", ds, [b(a(l.issueNumber) + " ", 1), (o(), t("svg", {
                    xmlns: "http://www.w3.org/2000/svg",
                    class: n({
                        r: y == v.value
                    }),
                    width: "9",
                    height: "8",
                    viewBox: "0 0 9 8",
                    fill: "none"
                }, _s, 2))]), e("div", vs, a(c(L)(l.betTime)), 1)]), l.state !== 2 ? (o(), t("div", {
                    key: 0,
                    class: n(["list-item-r", {
                        success: l.state
                    }])
                }, [e("div", {
                    class: n({
                        success: l.state
                    })
                }, a(l.state ? s.$t("success") : s.$t("fail")), 3), e("span", null, a(`${l.state?"+":""}${c(p)(l.state?l.winLoseAmount+l.amount:l.winLoseAmount)}`), 1)], 2)) : g("v-if", !0)], 8, ns), y == v.value ? (o(), t("div", ps, [e("div", ms, a(s.$t("detailMay")), 1), e("div", hs, [e("span", null, a(s.$t("orderNoMay")), 1), e("div", {
                    class: "list-detail-copy",
                    onClick: G => c(ss)(l.orderNo)
                }, [b(a(l.orderNo) + " ", 1), gs], 8, ys)]), e("div", fs, [e("span", null, a(s.$t("issueMay")), 1), e("div", null, a(l.issueNumber), 1)]), e("div", ks, [e("span", null, a(s.$t("amountMay")), 1), e("div", null, a(c(p)(l.amount)), 1)]), e("div", ws, [e("span", null, a(s.$t("numMay")), 1), e("div", null, a(l.betMultiple), 1)]), e("div", $s, [e("span", null, a(s.$t("afterTaxAmount")), 1), e("div", Bs, a(c(p)(l.realAmount)), 1)]), e("div", Ns, [e("span", null, a(s.$t("tax")), 1), e("div", null, a(c(p)(l.fee)), 1)]), e("div", Ms, [e("span", null, a(s.$t("resultMay")), 1), l.number ? (o(), t("div", Ss, [e("div", bs, a(l.number), 1), e("div", {
                    class: n(["list-inlineB", [E(Number(l.number))]])
                }, a(j(Number(l.number))), 3), l.number == 0 || l.number == 5 ? (o(), t("div", Ls, a(s.$t("purpleColor")), 1)) : g("v-if", !0), e("div", {
                    class: n(["list-inlineB", [Number(l.number) > 4 ? "big" : "small"]])
                }, a(Number(l.number) > 4 ? s.$t("big") : s.$t("small")), 3)])) : (o(), t("div", Ts, "--"))]), e("div", Rs, [e("span", null, a(s.$t("selectMay")), 1), e("div", null, a(l.playType == "Num" ? $(l.betContent) : z(l.betContent)), 1)]), e("div", Vs, [e("span", null, a(s.$t("statusMay")), 1), l.state != 2 ? (o(), t("div", {
                    key: 0,
                    class: n([l.state ? "green" : "red"])
                }, a(l.state ? s.$t("success") : s.$t("fail")), 3)) : (o(), t("div", As, a(s.$t("k3RecordDesc9")), 1))]), e("div", Cs, [e("span", null, a(s.$t("winOrLose")), 1), l.state != 2 ? (o(), t("div", {
                    key: 0,
                    class: n([l.state ? "green" : "red"])
                }, a(`${l.state?"+":""} ${c(p)(l.state?l.winLoseAmount+l.amount:l.winLoseAmount)}`), 3)) : (o(), t("div", Ds, "--"))]), e("div", Hs, [e("span", null, a(s.$t("createTime")), 1), e("div", null, a(c(L)(l.betTime, "YYYY-MM-DD HH:mm:ss")), 1)])])) : g("v-if", !0)]))), 128))])) : (o(), t("div", Is, [k(c(es))]))]), h.value.length ? (o(), t("div", zs, [e("div", {
                    class: n(["my_r-foot-previous", {
                        disabled: d.value <= 1
                    }]),
                    onClick: H
                }, [k(N, {
                    name: "arrow-left",
                    class: "my_r-icon",
                    size: "20"
                })], 2), e("div", Ps, a(d.value) + "/" + a(f.value), 1), e("div", {
                    class: n(["my_r-foot-next", {
                        disabled: d.value >= f.value
                    }]),
                    onClick: I
                }, [k(N, {
                    name: "arrow",
                    class: "my_r-icon",
                    size: "20"
                })], 2)])) : g("v-if", !0)])
            }
        }
    });
const Js = as(Ys, [
    ["__scopeId", "data-v-921618b9"],
    ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/saasLottery/game/TrxWinGo/components/trx2/myRecord.vue"]
]);
export {
    Js as
    default
};