"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_empty2 = common_vendor.resolveComponent("hs-empty");
  const _easycom_hs_footer2 = common_vendor.resolveComponent("hs-footer");
  (_easycom_hs_empty2 + _easycom_hs_footer2)();
}
const _easycom_hs_empty = () => "../../../../components/hs-empty/hs-empty.js";
const _easycom_hs_footer = () => "../../../../components/hs-footer/hs-footer.js";
if (!Math) {
  (_easycom_hs_empty + _easycom_hs_footer)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "permission_show",
  setup(__props) {
    const listData = common_vendor.ref([]);
    const handleSubmit = () => {
      common_vendor.index.navigateBack({
        delta: 1
      });
    };
    const handleMakePhoneCall = (phone) => {
      if (phone) {
        common_vendor.index.makePhoneCall({
          phoneNumber: phone
        });
      } else {
        common_vendor.index.showToast({
          title: "当前人员手机号为空！",
          icon: "none"
        });
      }
    };
    const getPermission = (data) => {
      common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Emergency.EmergencyEventTeams.GetPermission, {
        asset_projects_id: data == null ? void 0 : data.id
      }).then((res) => {
        var _a;
        listData.value = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.members) || [];
        console.log(res);
      });
    };
    common_vendor.onLoad((e) => {
      getPermission(e);
    });
    return (_ctx, _cache) => {
      var _a, _b;
      return common_vendor.e({
        a: !((_a = listData.value) == null ? void 0 : _a.length)
      }, !((_b = listData.value) == null ? void 0 : _b.length) ? {
        b: common_vendor.p({
          height: "20vh"
        })
      } : {}, {
        c: common_vendor.f(listData.value, (i, index, i0) => {
          return {
            a: common_vendor.t(i == null ? void 0 : i.employee_name),
            b: common_vendor.t(i == null ? void 0 : i.employee_phone),
            c: common_vendor.o(($event) => handleMakePhoneCall(i == null ? void 0 : i.employee_phone), `item_${index}`),
            d: `item_${index}`
          };
        }),
        d: common_vendor.o(handleSubmit),
        e: common_vendor.p({
          btnParimaryName: "报其他项目"
        })
      });
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/pages/public/select_project/pages/permission_show.vue"]]);
wx.createPage(MiniProgramPage);
