"use strict";
const common_vendor = require("../../common/vendor.js");
const gen_Enums = require("../../gen/Enums.js");
const CUSTOMER_list_user_method = require("./method.js");
const CUSTOMER_list_user_model = require("./model.js");
require("../../gen/Apis.js");
require("../../common/libraries/request.js");
require("../../common/store/useWeAppAuthStore.js");
require("../../common/libraries/apiLoading.js");
require("../../common/store/useWatermarkStore.js");
require("../../common/store/useWorkStore.js");
if (!Array) {
  const _easycom_up_search2 = common_vendor.resolveComponent("up-search");
  const _easycom_up_avatar2 = common_vendor.resolveComponent("up-avatar");
  const _easycom_hs_enum_tag2 = common_vendor.resolveComponent("hs-enum-tag");
  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  const _easycom_cc_scroll_loading2 = common_vendor.resolveComponent("cc-scroll-loading");
  (_easycom_up_search2 + _easycom_up_avatar2 + _easycom_hs_enum_tag2 + _easycom_uni_icons2 + _easycom_cc_scroll_loading2)();
}
const _easycom_up_search = () => "../../node-modules/uview-plus/components/u-search/u-search.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_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_cc_scroll_loading = () => "../../common/components/cc-scroll-loading/cc-scroll-loading.js";
if (!Math) {
  (_easycom_up_search + _easycom_up_avatar + _easycom_hs_enum_tag + _easycom_uni_icons + _easycom_cc_scroll_loading)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const toDetailePage = (e) => {
      common_vendor.index.navigateTo({
        url: `/CUSTOMER/show/index?id=${e == null ? void 0 : e.id}`
      });
    };
    common_vendor.onLoad(() => {
      var _a;
      (_a = CUSTOMER_list_user_method.method) == null ? void 0 : _a.getList();
    });
    common_vendor.onUnload(() => {
      CUSTOMER_list_user_model.useModel.listData.value = [];
    });
    return (_ctx, _cache) => {
      var _a, _b, _c, _d, _e, _f;
      return {
        a: common_vendor.o((_a = common_vendor.unref(CUSTOMER_list_user_method.method)) == null ? void 0 : _a.handleSearch),
        b: common_vendor.o(($event) => common_vendor.unref(CUSTOMER_list_user_model.useModel).formData.value.keyword = $event),
        c: common_vendor.p({
          placeholder: "搜索房号/手机号/姓名",
          showAction: false,
          modelValue: common_vendor.unref(CUSTOMER_list_user_model.useModel).formData.value.keyword
        }),
        d: common_vendor.f((_c = (_b = common_vendor.unref(CUSTOMER_list_user_model.useModel)) == null ? void 0 : _b.listData) == null ? void 0 : _c.value, (i, k0, i0) => {
          return {
            a: common_vendor.t(i == null ? void 0 : i.house_name),
            b: common_vendor.f(i == null ? void 0 : i.occupants, (k, k1, i1) => {
              return common_vendor.e({
                a: "508bcffd-2-" + i0 + "-" + i1 + ",508bcffd-1",
                b: common_vendor.t(k == null ? void 0 : k.name),
                c: common_vendor.t(k == null ? void 0 : k.phone),
                d: (k == null ? void 0 : k.house_relation) === "Owner"
              }, (k == null ? void 0 : k.house_relation) === "Owner" ? {} : {}, (i == null ? void 0 : i.is_contact) ? {} : {}, {
                e: (k == null ? void 0 : k.house_relation) === "NonOwner" && (k == null ? void 0 : k.residential_relation)
              }, (k == null ? void 0 : k.house_relation) === "NonOwner" && (k == null ? void 0 : k.residential_relation) ? {
                f: "508bcffd-3-" + i0 + "-" + i1 + ",508bcffd-1",
                g: common_vendor.p({
                  Enums: common_vendor.unref(gen_Enums.HouseOccupantsResidentialRelationEnum),
                  value: k == null ? void 0 : k.residential_relation
                })
              } : {}, {
                h: "508bcffd-4-" + i0 + "-" + i1 + ",508bcffd-1",
                i: common_vendor.o(($event) => toDetailePage(k), i == null ? void 0 : i.index)
              });
            }),
            c: i == null ? void 0 : i.is_contact,
            d: i == null ? void 0 : i.index,
            e: `customer_${i == null ? void 0 : i.index}`
          };
        }),
        e: common_vendor.p({
          type: "right",
          size: "13",
          color: "#999"
        }),
        f: common_vendor.o((_d = common_vendor.unref(CUSTOMER_list_user_method.method)) == null ? void 0 : _d.handleLoad),
        g: common_vendor.p({
          meta: (_f = (_e = common_vendor.unref(CUSTOMER_list_user_model.useModel)) == null ? void 0 : _e.metaData) == null ? void 0 : _f.value
        })
      };
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/CUSTOMER/list_user/index.vue"]]);
wx.createPage(MiniProgramPage);
