"use strict";
const common_vendor = require("../../common/vendor.js");
const ME_pre_stored_form_model = require("./model.js");
const ME_pre_stored_form_method = require("./method.js");
require("../../common/libraries/request.js");
require("../../common/store/useWeAppAuthStore.js");
require("../../gen/Apis.js");
require("../../common/store/useWorkStore.js");
require("../../common/libraries/setTabBar.js");
require("../../common/libraries/apiLoading.js");
require("../../common/libraries/pay.js");
require("../../common/libraries/naviHelper.js");
if (!Array) {
  const _easycom_hs_button2 = common_vendor.resolveComponent("hs-button");
  _easycom_hs_button2();
}
const _easycom_hs_button = () => "../../components/hs-button/hs-button.js";
if (!Math) {
  _easycom_hs_button();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    common_vendor.ref("");
    const pay_price_list = ["500", "1000", "3000", "5000"];
    common_vendor.ref({});
    common_vendor.onShow(() => {
      var _a, _b, _c, _d;
      if ((_c = (_b = (_a = ME_pre_stored_form_model.useModel) == null ? void 0 : _a.housePrepaymentPayment) == null ? void 0 : _b.value) == null ? void 0 : _c.id) {
        (_d = ME_pre_stored_form_method.method) == null ? void 0 : _d.loadShow();
      }
      console.log("onShow");
    });
    common_vendor.onUnload(() => {
      ME_pre_stored_form_model.useModel.loadingShowNumber.value = -1;
      ME_pre_stored_form_model.useModel.housePrepaymentPayment.value = void 0;
    });
    common_vendor.onLoad((e) => {
      ME_pre_stored_form_model.useModel.loadingShowNumber.value = -1;
      ME_pre_stored_form_model.useModel.formData.value = e;
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e, _f, _g, _h;
      return common_vendor.e({
        a: common_vendor.t(((_a = common_vendor.unref(ME_pre_stored_form_model.useModel).formData.value) == null ? void 0 : _a.full_name) || ""),
        b: common_vendor.unref(ME_pre_stored_form_model.useModel).formData.value.amount,
        c: common_vendor.o(($event) => common_vendor.unref(ME_pre_stored_form_model.useModel).formData.value.amount = $event.detail.value),
        d: common_vendor.f(pay_price_list, (i, index, i0) => {
          return {
            a: common_vendor.t(i),
            b: `pay_${index}`,
            c: common_vendor.o(($event) => common_vendor.unref(ME_pre_stored_form_model.useModel).formData.value.amount = i, `pay_${index}`)
          };
        }),
        e: !common_vendor.unref(ME_pre_stored_form_model.useModel).formData.value.amount || ((_c = (_b = common_vendor.unref(ME_pre_stored_form_model.useModel)) == null ? void 0 : _b.payDisabled) == null ? void 0 : _c.value)
      }, !common_vendor.unref(ME_pre_stored_form_model.useModel).formData.value.amount || ((_e = (_d = common_vendor.unref(ME_pre_stored_form_model.useModel)) == null ? void 0 : _d.payDisabled) == null ? void 0 : _e.value) ? {
        f: common_vendor.p({
          type: "disabled",
          label: "立即支付",
          loading: (_g = (_f = common_vendor.unref(ME_pre_stored_form_model.useModel)) == null ? void 0 : _f.payDisabled) == null ? void 0 : _g.value,
          size: "md"
        })
      } : {
        g: common_vendor.o((_h = common_vendor.unref(ME_pre_stored_form_method.method)) == null ? void 0 : _h.handlePay),
        h: common_vendor.p({
          type: "primary",
          label: "立即支付",
          size: "md"
        })
      });
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/ME/pre_stored_form/index.vue"]]);
wx.createPage(MiniProgramPage);
