import {
  _ as e,
  b as t,
  a,
  u as l,
  j as i,
  D as s,
  c as n,
  aC as o,
  m as u,
  p as d,
  o as r,
  f as c,
  t as v,
  e as f,
  r as y,
  h as m,
  F as p,
  y as x,
  i as k,
  as as $,
  bi as g,
  R as h,
  G as b,
  az as I,
  aW as _,
  A as w,
  B as E,
} from "./index-476be0bb.js";
import { _ as j, a as F } from "./inactive-62bbd674.js";
import { _ as C } from "./point-afbdbc16.js";
import { g as M, h as R, i as T } from "./api.mine-40f950d7.js";
const X = (e) => (w("data-v-a74356d2"), (e = e()), E(), e),
  A = { class: "px-14 mt-12" },
  D = { class: "bg-white mb-10 px-16" },
  N = { class: "relative py-18 van-hairline--bottom text-18" },
  S = ["onClick"],
  U = { class: "flex items-center justify-between py-8 relative item" },
  B = { class: "text-14 text-black" },
  G = { key: 0, class: "w-17 ml-13", src: j, alt: "" },
  P = { key: 1, class: "w-17 ml-13", src: F, alt: "" },
  q = {
    class:
      "bg-white rounded-8 mb-10 flex items-center justify-between relative item px-16",
  },
  z = { class: "flex items-center w-88%" },
  H = { class: "text-14 text-black w-33%" },
  K = { class: "ml-10 text-18 w-98% overflow-hidden" },
  L = X(() =>
    c(
      "div",
      { class: "inline-block w-16 h-16 relative" },
      [c("span", { class: "absolute bottom-1" }, "...")],
      -1
    )
  ),
  V = { key: 2, class: "text-16 translate-y-1 text-grey" },
  W = { class: "text-14 h-50 lh-50 text-#5A55E6 w-50 text-center" },
  J = { class: "rounded-8 bg-white p-20 pb-0" },
  O = { class: "justify-center text-14" },
  Q = { key: 0, class: "pl-20 text-#E21716" },
  Y = { key: 1, class: "pl-20 text-#E21716" },
  Z = { key: 2, class: "pl-20 text-#E21716" },
  ee = { key: 3, class: "pl-20 text-#E21716" },
  te = { key: 4, class: "pl-20 text-#E21716" },
  ae = { key: 5, class: "pl-20 text-#E21716" },
  le = { key: 6, class: "pl-20 text-#E21716" },
  ie = ["placeholder"],
  se = { class: "h-70 text-14 relative" },
  ne = { class: "lh-30 pt-3 text-#aaa" },
  oe = { key: 0, class: "lh-30" },
  ue = { key: 0, class: "text-#E21716" },
  de = { key: 1, class: "text-#E21716" },
  re = { key: 2, class: "text-#E21716" },
  ce = { key: 3, class: "text-#E21716" },
  ve = { key: 4, class: "text-#E21716" },
  fe = { key: 5, class: "text-#E21716" },
  ye = { key: 6, class: "text-#E21716" },
  me = {
    key: 0,
    class:
      "flex mt-10 items-center justify-center text-16 font-600 h-45 rounded-8 bg-#8C89F0 text-white",
  },
  pe = { class: "rounded-8 overflow-hidden" },
  xe = { class: "bg-white mt-12 py-14 px-16" },
  ke = { class: "font-600" },
  $e = { class: "mt-8 text-14" },
  ge = { class: "flex items-center lh-26 py-4" },
  he = { key: 0, class: "ml-5 text-main font-600" },
  be = { key: 1, class: "ml-5 text-main font-600" },
  Ie = { key: 2, class: "ml-5 text-main font-600" },
  _e = { key: 3, class: "ml-5 text-main font-600" },
  we = { key: 4, class: "ml-5 text-main font-600" },
  Ee = { key: 5, class: "ml-5 text-main font-600" },
  je = X(() => c("img", { class: "w-20 ml-5", src: C, alt: "" }, null, -1)),
  Fe = { class: "flex items-center lh-26" },
  Ce = e(
    {
      __name: "index",
      setup(e) {
        const w = t(),
          { t: E } = a(),
          j = l();
        let F = i([
          { title: E("孟加拉国"), id: 5, errorMsg: E("请添加孟加拉国") },
          {
            title: E("尼日利亚") + 1,
            id: 3,
            errorMsg: E("请添加尼日利亚") + 1,
          },
          { title: E("菲律宾"), id: 7, errorMsg: E("请添加菲律宾") },
          { title: "TRX", id: 4, errorMsg: E("请添加TRX地址") },
        ]);
        const C = i(F.value[0]);
        M().then((e) => {
          let t = [];
          for (let a in e.data)
            1 == e.data[a].status &&
              t.push({
                title: E(e.data[a].name),
                id: e.data[a].id,
                errorMsg: E("请添加") + E(e.data[a].name),
              });
          (F.value = t), (C.value = F.value[0]), Ce();
        });
        const X = i("");
        function Ce() {
          (2 != C.value.id && 3 != C.value.id && 6 != C.value.id) ||
            (j.userInfo.money < 300
              ? (Me.value = 0)
              : (Me.value = j.userInfo.money - 300)),
            1 == C.value.id &&
              (j.userInfo.money < 500
                ? (Me.value = 0)
                : (Me.value = j.userInfo.money - 500)),
            7 == C.value.id &&
              (j.userInfo.money < 500
                ? (Me.value = 0)
                : (Me.value = j.userInfo.money - 500)),
            8 == C.value.id &&
              (j.userInfo.money < j.config.brl_fee
                ? (Me.value = 0)
                : (Me.value = j.userInfo.money - j.config.brl_fee)),
            4 == C.value.id &&
              (j.userInfo.money < 300
                ? (Me.value = 0)
                : (Me.value = j.userInfo.money - 300)),
            5 == C.value.id &&
              (j.userInfo.money < 300
                ? (Me.value = 0)
                : (Me.value = j.userInfo.money - 300));
        }
        const Me = i("");
        s(() => {
          Ce();
        });
        const Re = n(() =>
            "" === X.value
              ? 0
              : 2 === C.value.id
              ? "".concat(
                  ((+X.value / 100) * +j.config.vi_rate).toFixed(2),
                  " KES"
                )
              : 3 === C.value.id || 6 === C.value.id
              ? "".concat(
                  ((+X.value / 100) * +j.config.nrly_rate).toFixed(2),
                  " NGN"
                )
              : 1 === C.value.id
              ? "".concat(
                  ((+X.value / 100) * +j.config.trx_rate).toFixed(2),
                  " USDT"
                )
              : 4 === C.value.id
              ? "".concat(
                  ((+X.value / 100) * +j.config.trx_rate1).toFixed(2),
                  " TRX"
                )
              : 5 === C.value.id
              ? "".concat(
                  ((+X.value / 100) * +j.config.bdt_rate).toFixed(2),
                  " BDT"
                )
              : 7 === C.value.id
              ? "".concat(
                  ((+X.value / 100) * +j.config.php_rate).toFixed(2),
                  " PHP"
                )
              : "".concat(
                  (
                    (+(X.value + parseInt(j.config.brl_fee)) / 100) *
                    +j.config.brl_rate
                  ).toFixed(2),
                  " BRL"
                )
          ),
          Te = () => {
            if ("" === X.value) return b(E("请输入金额"));
            if (2 == C.value.id || 3 == C.value.id || 6 == C.value.id) {
              if (X.value / 1 > j.userInfo.money - 300) return b(E("余额不足"));
              if (X.value / 1 < 1e3) return b(E("最低提现金额") + 1e3);
            } else if (1 == C.value.id) {
              if (X.value / 1 < 2e4) return b(E("最低提现金额") + 2e4);
              if (X.value / 1 > j.userInfo.money - 500) return b(E("余额不足"));
            } else if (4 == C.value.id) {
              if (X.value / 1 < 5e3) return b(E("最低提现金额") + 5e3);
              if (X.value / 1 > j.userInfo.money - 300) return b(E("余额不足"));
            } else if (5 == C.value.id) {
              if (X.value / 1 <(4e3+500)) return b(E("最低提现金额") + (4e3+500));
              if (X.value / 1 > j.userInfo.money - 300) return b(E("余额不足"));
            //   if (X.value / 1 < 7e3) return b(E("最低提现金额") + 7e3);
            //   if (X.value / 1 > j.userInfo.money - 500) return b(E("余额不足"));
            } else if (7 == C.value.id) {
              if (X.value / 1 < 5e3) return b(E("最低提现金额") + 5e3);
              if (X.value / 1 > j.userInfo.money - 500) return b(E("余额不足"));
            } else {
              if (X.value / 1 < 5e3) return b(E("最低提现金额") + 5e3);
              if (X.value / 1 > j.userInfo.money - parseInt(j.config.brl_fee))
                return b(E("余额不足"));
            }
            if (!Xe.value[C.value.id]) return b(C.value.errorMsg);
            I({ forbidClick: !0, duration: 0 }),
              T({ money: X.value, bank_id: Xe.value[C.value.id].id }).then(
                (e) => {
                  _(), b("提交成功"), (X.value = "");
                }
              );
          },
          Xe = i({});
        R().then((e) => {
          const t = {};
          e.data.forEach((e) => {
            t[e.type] = e;
          }),
            (Xe.value = t);
        });
        const Ae = () => {
          w.push({ path: "/userInfo", query: { type: C.value.id } });
        };
        return (e, t) => {
          const a = o("normal-layout");
          return (
            r(),
            u(
              a,
              {
                flex: "",
                "bg-color": "#f6f6f6",
                "nav-bg-color": "#fff",
                "text-color": "#000",
                title: e.$t("账号提现"),
                backType: 0,
              },
              {
                default: d(() => {
                  var a, l, i, s, n, o;
                  return [
                    c("div", A, [
                      c("div", D, [
                        c("div", N, v(e.$t("转出到")), 1),
                        (r(!0),
                        f(
                          p,
                          null,
                          y(
                            m(F),
                            (e, t) => (
                              r(),
                              f(
                                "div",
                                {
                                  key: e.id,
                                  onClick: (t) => {
                                    return (a = e), (C.value = a), void Ce();
                                    var a;
                                  },
                                  class: "relative py-10 van-hairline--bottom",
                                },
                                [
                                  c("div", U, [
                                    c("div", B, v(e.title), 1),
                                    c("div", null, [
                                      m(C).id === e.id
                                        ? (r(), f("img", G))
                                        : (r(), f("img", P)),
                                    ]),
                                  ]),
                                ],
                                8,
                                S
                              )
                            )
                          ),
                          128
                        )),
                      ]),
                      c("div", q, [
                        c("div", z, [
                          c("div", H, v(m(C).title), 1),
                          c("div", K, [
                            (null == (a = m(Xe)[m(C).id])
                              ? void 0
                              : a.account.length) < 25
                              ? (r(),
                                f(
                                  p,
                                  { key: 0 },
                                  [x(v(m(Xe)[m(C).id].account), 1)],
                                  64
                                ))
                              : k("", !0),
                            (null == (l = m(Xe)[m(C).id])
                              ? void 0
                              : l.account.length) >= 25
                              ? (r(),
                                f(
                                  p,
                                  { key: 1 },
                                  [
                                    x(
                                      v(m(Xe)[m(C).id].account.slice(0, 10)),
                                      1
                                    ),
                                    L,
                                    x(
                                      v(
                                        m(Xe)[m(C).id].account.slice(
                                          (null == (i = m(Xe)[m(C).id])
                                            ? void 0
                                            : i.account.length) - 10,
                                          null == (s = m(Xe)[m(C).id])
                                            ? void 0
                                            : s.account.length
                                        )
                                      ),
                                      1
                                    ),
                                  ],
                                  64
                                ))
                              : k("", !0),
                            (null == (n = m(Xe)[m(C).id]) ? void 0 : n.account)
                              ? k("", !0)
                              : (r(),
                                f("div", V, [
                                  5 === m(C).id
                                    ? (r(),
                                      f(
                                        p,
                                        { key: 0 },
                                        [x(v(e.$t("请添加孟加拉国")), 1)],
                                        64
                                      ))
                                    : k("", !0),
                                  3 === m(C).id
                                    ? (r(),
                                      f(
                                        p,
                                        { key: 1 },
                                        [x(v(e.$t("请添加尼日利亚")) + "1", 1)],
                                        64
                                      ))
                                    : k("", !0),
                                  6 === m(C).id
                                    ? (r(),
                                      f(
                                        p,
                                        { key: 2 },
                                        [x(v(e.$t("请添加尼日利亚")) + "2", 1)],
                                        64
                                      ))
                                    : k("", !0),
                                  7 === m(C).id
                                    ? (r(),
                                      f(
                                        p,
                                        { key: 3 },
                                        [x(v(e.$t("请添加菲律宾")), 1)],
                                        64
                                      ))
                                    : k("", !0),
                                  8 === m(C).id
                                    ? (r(),
                                      f(
                                        p,
                                        { key: 4 },
                                        [x(v(e.$t("请添加巴西")), 1)],
                                        64
                                      ))
                                    : k("", !0),
                                  2 === m(C).id
                                    ? (r(),
                                      f(
                                        p,
                                        { key: 5 },
                                        [x(v(e.$t("请添加孟加拉国")), 1)],
                                        64
                                      ))
                                    : k("", !0),
                                  1 === m(C).id
                                    ? (r(),
                                      f(
                                        p,
                                        { key: 6 },
                                        [x(v(e.$t("请添加USDT地址")), 1)],
                                        64
                                      ))
                                    : k("", !0),
                                  4 === m(C).id
                                    ? (r(),
                                      f(
                                        p,
                                        { key: 7 },
                                        [x(v(e.$t("请添加TRX地址")), 1)],
                                        64
                                      ))
                                    : k("", !0),
                                ])),
                          ]),
                        ]),
                        c("div", { onClick: Ae }, [
                          c("div", W, [
                            (null == (o = m(Xe)[m(C).id]) ? void 0 : o.account)
                              ? (r(),
                                f(p, { key: 0 }, [x(v(e.$t("修改")), 1)], 64))
                              : (r(),
                                f(p, { key: 1 }, [x(v(e.$t("添加")), 1)], 64)),
                          ]),
                        ]),
                      ]),
                      c("div", J, [
                        c("div", O, [
                          x(v(e.$t("转出金额")) + " ", 1),
                          1 == m(C).id
                            ? (r(),
                              f(
                                "span",
                                Q,
                                v(e.$t("提款手续费")) +
                                  "：500 " +
                                  v(e.$t("积分")),
                                1
                              ))
                            : k("", !0),
                          2 == m(C).id
                            ? (r(),
                              f(
                                "span",
                                Y,
                                v(e.$t("提款手续费")) +
                                  "：300 " +
                                  v(e.$t("积分")),
                                1
                              ))
                            : k("", !0),
                          3 == m(C).id || 6 == m(C).id
                            ? (r(),
                              f(
                                "span",
                                Z,
                                v(e.$t("提款手续费")) +
                                  "：300 " +
                                  v(e.$t("积分")),
                                1
                              ))
                            : k("", !0),
                          4 == m(C).id
                            ? (r(),
                              f(
                                "span",
                                ee,
                                v(e.$t("提款手续费")) +
                                  "：300 " +
                                  v(e.$t("积分")),
                                1
                              ))
                            : k("", !0),
                          7 == m(C).id
                            ? (r(),
                              f(
                                "span",
                                te,
                                v(e.$t("提款手续费")) +
                                  "：500 " +
                                  v(e.$t("积分")),
                                1
                              ))
                            : k("", !0),
                          8 == m(C).id
                            ? (r(),
                              f(
                                "span",
                                ae,
                                v(e.$t("提款手续费")) +
                                  "：" +
                                  v(m(j).config.brl_fee) +
                                  " " +
                                  v(e.$t("积分")),
                                1
                              ))
                            : k("", !0),
                          5 == m(C).id
                            ? (r(),
                              f(
                                "span",
                                le,
                                v(e.$t("提款手续费")) +
                                  "：300 " +
                                  v(e.$t("积分")),
                                1
                              ))
                            : k("", !0),
                        ]),
                        $(
                          c(
                            "input",
                            {
                              "onUpdate:modelValue":
                                t[0] ||
                                (t[0] = (e) => (h(X) ? (X.value = e) : null)),
                              class: "py-15 borde text-18 w-full",
                              type: "number",
                              placeholder: e.$t("最多可转出") + m(Me),
                            },
                            null,
                            8,
                            ie
                          ),
                          [[g, m(X)]]
                        ),
                        c("div", se, [
                          c("div", ne, v(e.$t("您将提现")), 1),
                          m(X)
                            ? (r(),
                              f("div", oe, [
                                x(v(m(X)) + v(e.$t("积分")) + " ", 1),
                                5 == m(C).id
                                  ? (r(),
                                    // f("span", ue, "+500 " + v(e.$t("积分")), 1))
                                    f("span", ue, "+300 " + v(e.$t("积分")), 1))
                                  : k("", !0),
                                7 == m(C).id
                                  ? (r(),
                                    f("span", de, "+500 " + v(e.$t("积分")), 1))
                                  : k("", !0),
                                8 == m(C).id
                                  ? (r(),
                                    f(
                                      "span",
                                      re,
                                      "+" +
                                        v(m(j).config.brl_fee) +
                                        v(e.$t("积分")),
                                      1
                                    ))
                                  : k("", !0),
                                4 == m(C).id
                                  ? (r(),
                                    f("span", ce, "+300 " + v(e.$t("积分")), 1))
                                  : k("", !0),
                                3 == m(C).id || 6 == m(C).id
                                  ? (r(),
                                    f("span", ve, "+300 " + v(e.$t("积分")), 1))
                                  : k("", !0),
                                2 == m(C).id
                                  ? (r(),
                                    f("span", fe, "+300 " + v(e.$t("积分")), 1))
                                  : k("", !0),
                                1 == m(C).id
                                  ? (r(),
                                    f("span", ye, "+500 " + v(e.$t("积分")), 1))
                                  : k("", !0),
                                x(" = " + v(m(Re)), 1),
                              ]))
                            : k("", !0),
                        ]),
                      ]),
                      m(X)
                        ? k("", !0)
                        : (r(), f("div", me, v(e.$t("确定")), 1)),
                      m(X)
                        ? (r(),
                          f(
                            "div",
                            {
                              key: 1,
                              class:
                                "flex mt-10 items-center justify-center text-16 font-600 h-45 rounded-8 bg-#5A55E6 text-white",
                              onClick: Te,
                            },
                            v(e.$t("确定")),
                            1
                          ))
                        : k("", !0),
                      c("div", pe, [
                        c("div", xe, [
                          c("div", ke, v(e.$t("提现说明")), 1),
                          c("ul", $e, [
                            c("li", ge, [
                              x(v(e.$t("最低提现金额为")) + " ", 1),
                              5 == m(C).id
                                ? (r(), f("span", he, "4500"))
                                : k("", !0),
                              7 == m(C).id
                                ? (r(), f("span", be, "5000"))
                                : k("", !0),
                              8 == m(C).id
                                ? (r(), f("span", Ie, "5000"))
                                : k("", !0),
                              1 == m(C).id
                                ? (r(), f("span", _e, "20000"))
                                : k("", !0),
                              2 == m(C).id || 3 == m(C).id || 6 == m(C).id
                                ? (r(), f("span", we, "4500"))
                                : k("", !0),
                              4 == m(C).id
                                ? (r(), f("span", Ee, "5000"))
                                : k("", !0),
                              je,
                            ]),
                            c(
                              "li",
                              Fe,
                              v(
                                e.$t(
                                  "每天只能提现3次请仔细核对信息是否输入正确，提现未到账，请联系客服"
                                )
                              ),
                              1
                            ),
                          ]),
                        ]),
                      ]),
                    ]),
                  ];
                }),
                _: 1,
              },
              8,
              ["title"]
            )
          );
        };
      },
    },
    [["__scopeId", "data-v-a74356d2"]]
  );
export { Ce as default };
