"use strict";
const common_vendor = require("../../common/vendor.js");
require("../../common/libraries/request.js");
require("../../common/store/useWatermarkStore.js");
const common_store_useWeAppAuthStore = require("../../common/store/useWeAppAuthStore.js");
require("../../common/store/useWorkStore.js");
const gen_Enums = require("../../gen/Enums.js");
const CUSTOMER_house_Identity_method = require("./method.js");
const CUSTOMER_house_Identity_model = require("./model.js");
require("../../gen/Apis.js");
require("../../common/libraries/apiLoading.js");
require("../../common/libraries/naviHelper.js");
require("../../common/libraries/sendWxWork.js");
if (!Array) {
  const _easycom_hs_radio2 = common_vendor.resolveComponent("hs-radio");
  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
  (_easycom_hs_radio2 + _easycom_uni_icons2 + _easycom_hs_footer2)();
}
const _easycom_hs_radio = () => "../../components/hs-radio/hs-radio.js";
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_hs_footer = () => "../../components/hs-footer/hs-footer.js";
if (!Math) {
  (_easycom_hs_radio + _easycom_uni_icons + _easycom_hs_footer)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const auth = common_store_useWeAppAuthStore.useWeAppAuthStore();
    common_vendor.onLoad(async (e) => {
      var _a, _b;
      await ((_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$onLaunched);
      CUSTOMER_house_Identity_model.useModel.formData.value = e;
      console.log(e, "eee");
      if (((_b = auth == null ? void 0 : auth.data) == null ? void 0 : _b.environment) === "wxwork") {
        common_vendor.index.qy.getCurExternalContact({
          success: function(res) {
            CUSTOMER_house_Identity_model.useModel.formData.value = {
              external_userid: res == null ? void 0 : res.userId,
              ...e
            };
            console.log("开始2", res);
          },
          fail: function(res) {
            CUSTOMER_house_Identity_model.useModel.formData.value = e;
            console.log("失败", res);
          }
        });
      }
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e;
      return {
        a: common_vendor.t((_c = (_b = (_a = common_vendor.unref(CUSTOMER_house_Identity_model.useModel)) == null ? void 0 : _a.formData) == null ? void 0 : _b.value) == null ? void 0 : _c.full_name),
        b: common_vendor.o(($event) => common_vendor.unref(CUSTOMER_house_Identity_model.useModel).formData.value.residential_relation = $event),
        c: common_vendor.p({
          Enums: common_vendor.unref(gen_Enums.HouseOccupantsResidentialRelationEnum),
          valueModel: common_vendor.unref(CUSTOMER_house_Identity_model.useModel).formData.value.residential_relation
        }),
        d: common_vendor.f((_e = (_d = common_vendor.unref(CUSTOMER_house_Identity_model.useModel)) == null ? void 0 : _d.collapse_list) == null ? void 0 : _e.value, (i, index, i0) => {
          return common_vendor.e({
            a: common_vendor.t(i == null ? void 0 : i.label),
            b: common_vendor.t((i == null ? void 0 : i.isShow) ? "收起" : "展开"),
            c: "5fd4d2bc-1-" + i0,
            d: common_vendor.p({
              type: (i == null ? void 0 : i.isShow) ? "down" : "right",
              size: "13",
              color: "#999"
            }),
            e: common_vendor.o(($event) => i.isShow = !i.isShow, `collapse_${index}`),
            f: i == null ? void 0 : i.isShow
          }, (i == null ? void 0 : i.isShow) ? {
            g: common_vendor.f(i == null ? void 0 : i.children, (k, idx, i1) => {
              return common_vendor.e({
                a: common_vendor.t(k == null ? void 0 : k.label),
                b: k == null ? void 0 : k.btnName
              }, (k == null ? void 0 : k.btnName) ? {
                c: common_vendor.t(k == null ? void 0 : k.btnName),
                d: "5fd4d2bc-2-" + i0 + "-" + i1,
                e: common_vendor.p({
                  type: "right",
                  size: "13",
                  color: "#0082FA"
                }),
                f: common_vendor.o(($event) => {
                  var _a2;
                  return (_a2 = common_vendor.unref(CUSTOMER_house_Identity_method.method)) == null ? void 0 : _a2.handleFindLinkClick(k);
                }, `collapse_${index}_${idx}`)
              } : {}, {
                g: `collapse_${index}_${idx}`
              });
            })
          } : {}, {
            h: `collapse_${index}`
          });
        }),
        e: common_vendor.o(common_vendor.unref(CUSTOMER_house_Identity_method.method).handleBindHouse),
        f: common_vendor.p({
          btnParimaryName: "绑定新房屋"
        })
      };
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/CUSTOMER/house_Identity/index.vue"]]);
wx.createPage(MiniProgramPage);
