"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
  const _easycom_hs_button2 = common_vendor.resolveComponent("hs-button");
  const _easycom_up_keyboard2 = common_vendor.resolveComponent("up-keyboard");
  (_easycom_hs_button2 + _easycom_up_keyboard2)();
}
const _easycom_hs_button = () => "../../components/hs-button/hs-button.js";
const _easycom_up_keyboard = () => "../../node-modules/uview-plus/components/u-keyboard/u-keyboard.js";
if (!Math) {
  (_easycom_hs_button + _easycom_up_keyboard)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const inputVal = common_vendor.ref("");
    const show = common_vendor.ref(true);
    const handleInputChange = (e) => {
      var _a, _b, _c;
      if (((_a = inputVal.value) == null ? void 0 : _a.length) < 12) {
        if (e === ".") {
          if (!((_b = inputVal.value) == null ? void 0 : _b.includes("."))) {
            inputVal.value += e;
          }
        } else {
          let inputNum = (_c = inputVal == null ? void 0 : inputVal.value) == null ? void 0 : _c.split(".")[1];
          console.log(inputNum, "inputNum");
          if (!inputNum || (inputNum == null ? void 0 : inputNum.length) < 2) {
            inputVal.value += e;
          }
        }
      }
      console.log(e);
    };
    const headleSubmit = () => {
      common_vendor.index.showModal({
        title: "提示",
        content: "该功能在当前项目暂未开放，敬请期待",
        confirmColor: "#0082FA",
        success: function(res) {
          if (res.confirm) {
            console.log("用户点击确定");
          } else if (res.cancel) {
            console.log("用户点击取消");
          }
        }
      });
    };
    const handleBackspaceChange = () => {
      var _a;
      inputVal.value = (_a = inputVal.value) == null ? void 0 : _a.slice(0, -1);
      console.log(inputVal.value);
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: !inputVal.value
      }, !inputVal.value ? {} : {
        b: common_vendor.t(inputVal.value)
      }, {
        c: common_vendor.o(($event) => show.value = true),
        d: common_vendor.o(headleSubmit),
        e: common_vendor.p({
          size: "md",
          label: "立即支付",
          type: "primary"
        }),
        f: common_vendor.o(($event) => show.value = false),
        g: common_vendor.o(handleInputChange),
        h: common_vendor.o(handleBackspaceChange),
        i: common_vendor.o(($event) => show.value = false),
        j: common_vendor.o(($event) => show.value = false),
        k: common_vendor.p({
          show: show.value
        })
      });
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/ME/recharge/index.vue"]]);
wx.createPage(MiniProgramPage);
