"use strict";
const common_vendor = require("../../../../common/vendor.js");
const gen_Enums = require("../../../../gen/Enums.js");
const BILL_outstanding_fee_show_method = require("../method.js");
const BILL_outstanding_fee_show_model = require("../model.js");
require("../../../../common/libraries/request.js");
require("../../../../common/store/useWeAppAuthStore.js");
require("../../../../gen/Apis.js");
require("../../../../common/store/useWatermarkStore.js");
require("../../../../common/store/useWorkStore.js");
require("../../../../common/libraries/apiLoading.js");
require("../../../../common/libraries/naviHelper.js");
require("../../../../common/libraries/sendWxWork.js");
require("../../../../common/libraries/day.js");
if (!Array) {
  const _easycom_hs_enum_tag2 = common_vendor.resolveComponent("hs-enum-tag");
  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  (_easycom_hs_enum_tag2 + _easycom_uni_icons2)();
}
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";
if (!Math) {
  (_easycom_hs_enum_tag + _easycom_uni_icons)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "PersonnelList",
  setup(__props) {
    const handleCopyPhone = (phone) => {
      if (phone) {
        common_vendor.index.makePhoneCall({
          phoneNumber: phone
          //仅为示例，并非真实的电话号码
        });
      }
    };
    const handleNavigateToDetail = (id) => {
      common_vendor.index.navigateTo({
        url: `/CUSTOMER/show/index?id=${id}`
      });
    };
    const handleNavigateToAddCustomer = (phone) => {
      common_vendor.index.setClipboardData({
        data: phone,
        success(res) {
          setTimeout(() => {
            common_vendor.index.qy.navigateToAddCustomer({
              success: function() {
              }
            });
          }, 1e3);
        }
      });
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.f(common_vendor.unref(BILL_outstanding_fee_show_model.useModel).listData.value, (i, index, i0) => {
          var _a, _b;
          return common_vendor.e({
            a: (_a = i == null ? void 0 : i.list) == null ? void 0 : _a.length
          }, ((_b = i == null ? void 0 : i.list) == null ? void 0 : _b.length) ? {
            b: common_vendor.t(i == null ? void 0 : i.label),
            c: common_vendor.f(i == null ? void 0 : i.list, (j, index2, i1) => {
              return common_vendor.e({
                a: common_vendor.t(j == null ? void 0 : j.name),
                b: common_vendor.t(j == null ? void 0 : j.phone),
                c: (j == null ? void 0 : j.house_relation) === "Owner"
              }, (j == null ? void 0 : j.house_relation) === "Owner" ? {} : {
                d: "04f66b1b-0-" + i0 + "-" + i1,
                e: common_vendor.p({
                  Enums: common_vendor.unref(gen_Enums.HouseOccupantsResidentialRelationEnum),
                  value: j == null ? void 0 : j.residential_relation
                })
              }, {
                f: "04f66b1b-1-" + i0 + "-" + i1,
                g: common_vendor.p({
                  type: "star-filled",
                  size: "20",
                  color: (j == null ? void 0 : j.is_contact) ? "#FFD666" : "#DCDFE6"
                }),
                h: common_vendor.t((j == null ? void 0 : j.is_contact) ? "常用联系人" : "设为常用"),
                i: common_vendor.o(($event) => {
                  var _a2;
                  return (_a2 = common_vendor.unref(BILL_outstanding_fee_show_method.method)) == null ? void 0 : _a2.handleSetContact(j);
                }, `personnel_${index2}`),
                j: common_vendor.o(($event) => handleCopyPhone(j == null ? void 0 : j.phone), `personnel_${index2}`),
                k: common_vendor.o(($event) => handleNavigateToAddCustomer(j == null ? void 0 : j.phone), `personnel_${index2}`),
                l: common_vendor.o(($event) => handleNavigateToDetail(j == null ? void 0 : j.id), `personnel_${index2}`),
                m: `personnel_${index2}`
              });
            })
          } : {}, {
            d: `item_${index}`
          });
        })
      };
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-04f66b1b"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/BILL/outstanding_fee/show/components/PersonnelList.vue"]]);
wx.createComponent(Component);
