var e = require("../../common/vendor.js"),
  u = require("../../enums/index.js"),
  r = require("../../utils/common.js");
require("../../service/index.js"),
  require("../../utils/request.js"),
  require("../../hooks/useState.js"),
  require("../../store/app/index.js"),
  require("../../data/index.js"),
  require("../../config/index.js"),
  require("../../constant/index.js"),
  require("../../utils/util.js"),
  require("../../utils/navigate.js"),
  Array || e.resolveComponent("uni-popup")(),
  Math;
var n = {
    __name: "index",
    props: { visible: { type: Boolean, default: !1 } },
    emits: ["close", "confirm"],
    setup: function (n, i) {
      var t = i.emit,
        o = n,
        a = e.ref(null),
        s = e.ref(null);
      e.watch(
        function () {
          return o.visible;
        },
        function () {
          o.visible
            ? (r.isSupportWeChatPay()
                ? (s.value = u.PayMethodEnum.WECHAT_PAY)
                : r.isSupportAliPay && (s.value = u.PayMethodEnum.ALI_PAY),
              a.value.open())
            : a.value.close();
        }
      );
      var l = function (e) {
          e.show || t("close");
        },
        c = function () {
          t("close");
        },
        p = function () {
          t("confirm", s.value);
        },
        f = function (e) {
          s.value = e.detail.value;
        };
      return function (n, i) {
        return e.e(
          { a: e.o(c), b: e.unref(r.isSupportWeChatPay)() },
          e.unref(r.isSupportWeChatPay)()
            ? {
                c: e.unref(u.PayMethodEnum).WECHAT_PAY,
                d: s.value === e.unref(u.PayMethodEnum).WECHAT_PAY,
              }
            : {},
          { e: e.unref(r.isSupportAliPay)() },
          e.unref(r.isSupportAliPay)()
            ? {
                f: e.unref(u.PayMethodEnum).ALI_PAY,
                g: s.value === e.unref(u.PayMethodEnum).ALI_PAY,
              }
            : {},
          {
            h: e.o(f),
            i: e.o(p),
            j: e.sr(a, "c238c94e-0", { k: "popup" }),
            k: e.o(l),
            l: e.p({ type: "center", "is-mask-click": !1, animation: !0 }),
          }
        );
      };
    },
  },
  i = e._export_sfc(n, [["__scopeId", "data-v-c238c94e"]]);
wx.createComponent(i);
