"use strict";
const common_vendor = require("../../../common/vendor.js");
const common_libraries_apiLoading = require("../../../common/libraries/apiLoading.js");
const gen_Apis = require("../../../gen/Apis.js");
require("../../../common/libraries/request.js");
require("../../../common/store/useWeAppAuthStore.js");
require("../../../common/store/useWatermarkStore.js");
require("../../../common/store/useWorkStore.js");
if (!Array) {
  const _easycom_hs_button2 = common_vendor.resolveComponent("hs-button");
  const _easycom_hs_popup2 = common_vendor.resolveComponent("hs-popup");
  const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
  (_easycom_hs_button2 + _easycom_hs_popup2 + _easycom_hs_footer2)();
}
const _easycom_hs_button = () => "../../../components/hs-button/hs-button.js";
const _easycom_hs_popup = () => "../../../components/hs-popup/hs-popup.js";
const _easycom_hs_footer = () => "../../../components/hs-footer/hs-footer.js";
if (!Math) {
  (_easycom_hs_button + _easycom_hs_popup + _easycom_hs_footer)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "PopupSubmitTemplate",
  props: ["formData", "type"],
  setup(__props) {
    const props = __props;
    const show = common_vendor.ref(false);
    const show_submit = common_vendor.ref(false);
    const handleSubmitClick = () => {
      var _a;
      console.log(props == null ? void 0 : props.type, "type");
      if (!((_a = props == null ? void 0 : props.type) == null ? void 0 : _a.length)) {
        common_vendor.index.showToast({
          title: "请选择通知方式!",
          icon: "none"
        });
        return;
      }
      show.value = !show.value;
    };
    const handleBack = () => {
      common_vendor.index.navigateBack({ delta: 1 });
    };
    const handleSubmitHouseCollectionTasks = () => {
      common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Collection.HouseCollectionTasks.Store, {
        ...props.formData,
        channel: props.type
      }).then((res) => {
        show.value = false;
        show_submit.value = true;
      });
    };
    const handleQuery = () => {
      common_vendor.index.redirectTo({
        url: "/BILL/collection_record/index/index"
      });
    };
    return (_ctx, _cache) => {
      var _a, _b;
      return {
        a: common_vendor.t((_b = (_a = props == null ? void 0 : props.formData) == null ? void 0 : _a.houses) == null ? void 0 : _b.length),
        b: common_vendor.o(handleSubmitHouseCollectionTasks),
        c: common_vendor.p({
          label: "确认提交",
          size: "md",
          type: "primary"
        }),
        d: common_vendor.o(handleSubmitClick),
        e: common_vendor.p({
          show: show.value,
          mode: "center",
          round: 15,
          closeable: true
        }),
        f: common_vendor.o(handleSubmitClick),
        g: common_vendor.p({
          btnParimaryName: "提交"
        }),
        h: common_vendor.o(handleBack),
        i: common_vendor.p({
          label: "返回欠费列表",
          size: "md",
          type: "default"
        }),
        j: common_vendor.o(handleQuery),
        k: common_vendor.p({
          label: "查看任务详情",
          size: "md"
        }),
        l: common_vendor.p({
          show: show_submit.value,
          mode: "center",
          round: 15
        })
      };
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ddb79a06"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/BILL/information_template/components/PopupSubmitTemplate.vue"]]);
wx.createComponent(Component);
