"use strict";
const common_vendor = require("../../common/vendor.js");
const INDEX_archive_houses_model = require("./model.js");
const INDEX_archive_houses_method = require("./method.js");
require("../../common/libraries/request.js");
const common_store_useWeAppAuthStore = require("../../common/store/useWeAppAuthStore.js");
require("../../common/store/useWorkStore.js");
const gen_Enums = require("../../gen/Enums.js");
require("../../common/libraries/apiLoading.js");
require("../../gen/Apis.js");
require("../../common/libraries/naviHelper.js");
require("../../common/libraries/userUserLogin.js");
require("../../common/libraries/setTabBar.js");
if (!Array) {
  const _easycom_hs_collection2 = common_vendor.resolveComponent("hs-collection");
  const _easycom_hs_empty2 = common_vendor.resolveComponent("hs-empty");
  const _easycom_up_avatar2 = common_vendor.resolveComponent("up-avatar");
  const _easycom_hs_enum_tag2 = common_vendor.resolveComponent("hs-enum-tag");
  const _easycom_hs_popup_switch_house2 = common_vendor.resolveComponent("hs-popup-switch-house");
  (_easycom_hs_collection2 + _easycom_hs_empty2 + _easycom_up_avatar2 + _easycom_hs_enum_tag2 + _easycom_hs_popup_switch_house2)();
}
const _easycom_hs_collection = () => "../../components/hs-collection/hs-collection.js";
const _easycom_hs_empty = () => "../../components/hs-empty/hs-empty.js";
const _easycom_up_avatar = () => "../../node-modules/uview-plus/components/u-avatar/u-avatar.js";
const _easycom_hs_enum_tag = () => "../../components/hs-enum-tag/hs-enum-tag.js";
const _easycom_hs_popup_switch_house = () => "../../components/hs-popup-switch-house/hs-popup-switch-house.js";
if (!Math) {
  (_easycom_hs_collection + _easycom_hs_empty + _easycom_up_avatar + _easycom_hs_enum_tag + MyCreateHousehold + _easycom_hs_popup_switch_house)();
}
const MyCreateHousehold = () => "./components/CreateHousehold.js";
const _sfc_defineComponent = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const show = common_vendor.ref(false);
    const auth = common_store_useWeAppAuthStore.useWeAppAuthStore();
    const handleSelectedHouse = (e) => {
      var _a;
      console.log(e, "sss");
      INDEX_archive_houses_model.useModel.formData.value.asset_houses_id = e == null ? void 0 : e.asset_houses_id;
      (_a = INDEX_archive_houses_method.method) == null ? void 0 : _a.handleSearch();
      show.value = false;
    };
    common_vendor.onHide(() => {
      show.value = false;
    });
    common_vendor.onLoad(() => {
      var _a, _b, _c;
      INDEX_archive_houses_model.useModel.formData.value.asset_houses_id = ((_b = (_a = auth == null ? void 0 : auth.data) == null ? void 0 : _a.selected_house) == null ? void 0 : _b.id) || "";
      (_c = INDEX_archive_houses_method.method) == null ? void 0 : _c.handleSearch();
    });
    common_vendor.onShareAppMessage(() => {
      return {
        title: "邀请您加入我的房屋",
        path: "/pages/index/index",
        imageUrl: "https://pay-prod-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01K5B5RY2TQQAJ1GT2RZSK426V.jpg"
      };
    });
    common_vendor.onShareTimeline(() => {
      return {
        title: "邀请您加入我的房屋",
        path: "/pages/index/index",
        imageUrl: "https://pay-prod-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01K5B5RY2TQQAJ1GT2RZSK426V.jpg"
      };
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
      return {
        a: common_vendor.t(((_e = (_d = (_c = (_b = (_a = common_vendor.unref(INDEX_archive_houses_model.useModel)) == null ? void 0 : _a.showData) == null ? void 0 : _b.value) == null ? void 0 : _c.house_relation) == null ? void 0 : _d.asset_house) == null ? void 0 : _e.full_name) || ""),
        b: common_vendor.o(($event) => show.value = true),
        c: common_vendor.t((_h = (_g = (_f = common_vendor.unref(INDEX_archive_houses_model.useModel)) == null ? void 0 : _f.showData) == null ? void 0 : _g.value) == null ? void 0 : _h.house_occupants_num),
        d: common_vendor.f((_j = (_i = common_vendor.unref(INDEX_archive_houses_model.useModel)) == null ? void 0 : _i.listData) == null ? void 0 : _j.value, (k, index, i0) => {
          var _a2, _b2;
          return common_vendor.e({
            a: common_vendor.t(k == null ? void 0 : k.label),
            b: !((_a2 = k.list) == null ? void 0 : _a2.length)
          }, !((_b2 = k.list) == null ? void 0 : _b2.length) ? {
            c: "afe28dc2-1-" + i0
          } : {}, {
            d: common_vendor.f(k.list, (i, index2, i1) => {
              var _a3, _b3, _c2, _d2, _e2, _f2, _g2, _h2;
              return common_vendor.e({
                a: "afe28dc2-2-" + i0 + "-" + i1,
                b: common_vendor.t(i == null ? void 0 : i.name),
                c: (i == null ? void 0 : i.house_relation) === "Owner"
              }, (i == null ? void 0 : i.house_relation) === "Owner" ? {
                d: "afe28dc2-3-" + i0 + "-" + i1,
                e: common_vendor.p({
                  value: i == null ? void 0 : i.house_relation,
                  Enums: common_vendor.unref(gen_Enums.HouseOccupantsHouseRelationEnum),
                  type: "primary"
                })
              } : {}, {
                f: (i == null ? void 0 : i.house_relation) === "NonOwner"
              }, (i == null ? void 0 : i.house_relation) === "NonOwner" ? {
                g: "afe28dc2-4-" + i0 + "-" + i1,
                h: common_vendor.p({
                  value: i == null ? void 0 : i.residential_relation,
                  Enums: common_vendor.unref(gen_Enums.HouseOccupantsResidentialRelationEnum),
                  type: "orange"
                })
              } : {}, {
                i: (i == null ? void 0 : i.house_relation) === "NonOwner" && ((_d2 = (_c2 = (_b3 = (_a3 = common_vendor.unref(INDEX_archive_houses_model.useModel)) == null ? void 0 : _a3.showData) == null ? void 0 : _b3.value) == null ? void 0 : _c2.house_relation) == null ? void 0 : _d2.house_relation) === "Owner"
              }, (i == null ? void 0 : i.house_relation) === "NonOwner" && ((_h2 = (_g2 = (_f2 = (_e2 = common_vendor.unref(INDEX_archive_houses_model.useModel)) == null ? void 0 : _e2.showData) == null ? void 0 : _f2.value) == null ? void 0 : _g2.house_relation) == null ? void 0 : _h2.house_relation) === "Owner" ? {
                j: common_vendor.o(($event) => {
                  var _a4;
                  return (_a4 = common_vendor.unref(INDEX_archive_houses_method.method)) == null ? void 0 : _a4.handleRemove(i);
                }, index2)
              } : {}, {
                k: index2
              });
            }),
            e: `item_${index}`
          });
        }),
        e: common_vendor.p({
          text: "U",
          fontSize: "18",
          bgColor: "#ffeade",
          color: "#333"
        }),
        f: common_vendor.o(($event) => show.value = false),
        g: common_vendor.o(handleSelectedHouse),
        h: common_vendor.p({
          show: show.value,
          pageSource: "archive_houses"
        })
      };
    };
  }
});
_sfc_defineComponent.__runtimeHooks = 6;
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_defineComponent, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-customer/src/INDEX/archive_houses/index.vue"]]);
wx.createPage(MiniProgramPage);
