import {
  G as O,
  a8 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,
  aW as U,
  ap as n,
  P as a,
  aB as L,
  O as c,
  ao as g,
  Q as k,
  aC as X,
  aD as x,
} from "./common.modules-cecf9b0d.js";
import {
  q as b,
  r as ss,
  E as es,
  s as ls,
} from "./page-saasLottery-D5-c991f6a0.js";
import { c as p, _ as as } from "./page-activity-ActivityDetail-6713f46c.js";
import "./page-home-other-6d9782ba.js";
import "./page-home-Casino-ff36f722.js";
import "./page-home-AllGames-ebd16353.js";
import "./page-activity-Bonus-c94a181e.js";
import "./page-turntable-assets-d6267459.js";
import "./native/index-9bac92b2.js";
import "./en-5d34117c.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 },
  Ls = { class: "list-inlineB" },
  bs = { key: 0, class: "list-inlineB violet" },
  Ts = { key: 1 },
  Vs = { class: "list-detail-line" },
  Rs = { 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" },
  Ws = O({
    __name: "myRecord",
    setup(m) {
      const V = M("trxWinHook"),
        { trigger: w, gameCode: R, update: A } = V,
        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: R.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]) : ""),
        W = (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]
            : "";
        },
        Y = (s) => {
          switch (s % 2) {
            case 1:
              return r("greenColor");
            default:
              return r("redColor");
          }
        },
        j = (s) => {
          switch (s % 2) {
            case 1:
              return "green";
            default:
              return "red";
          }
        },
        E = (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) => E(y), ["stop", "prevent"]),
                                },
                                [
                                  e("div", rs, [
                                    e(
                                      "div",
                                      {
                                        class: n([
                                          "list-item-l-" +
                                            $(l.betContent).toLocaleLowerCase(),
                                        ]),
                                      },
                                      a(W(l.betContent)),
                                      3
                                    ),
                                  ]),
                                  e("div", cs, [
                                    e("div", ds, [
                                      L(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(b)(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),
                                        },
                                        [L(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", Ls, a(l.number), 1),
                                            e(
                                              "div",
                                              {
                                                class: n([
                                                  "list-inlineB",
                                                  [j(Number(l.number))],
                                                ]),
                                              },
                                              a(Y(Number(l.number))),
                                              3
                                            ),
                                            l.number == 0 || l.number == 5
                                              ? (o(),
                                                t(
                                                  "div",
                                                  bs,
                                                  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", Vs, [
                                      e("span", null, a(s.$t("selectMay")), 1),
                                      e(
                                        "div",
                                        null,
                                        a(
                                          l.playType == "Num"
                                            ? $(l.betContent)
                                            : z(l.betContent)
                                        ),
                                        1
                                      ),
                                    ]),
                                    e("div", Rs, [
                                      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(b)(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 Zs = as(Ws, [
  ["__scopeId", "data-v-921618b9"],
  [
    "__file",
    "/usr/local/jenkins-prod/workspace/ar051-india-tiranga/src/saasLottery/game/TrxWinGo/components/trx2/myRecord.vue",
  ],
]);
export { Zs as default };
