"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  const _easycom_hs_popup2 = common_vendor.resolveComponent("hs-popup");
  (_easycom_uni_icons2 + _easycom_hs_popup2)();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_hs_popup = () => "../../components/hs-popup/hs-popup.js";
if (!Math) {
  (_easycom_uni_icons + _easycom_hs_popup)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const showPopup = common_vendor.ref(false);
    const selectType = common_vendor.ref("");
    const handleSubmissionRecord = (url) => {
      common_vendor.index.navigateTo({
        url
      });
    };
    const handleClose = () => {
      showPopup.value = false;
    };
    const list = [
      {
        label: "报修类",
        des: "设备、设施等出现故障，需维修处理",
        type: "Repair",
        icon: "https://pay-prod-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01K84V91E3TZ6BPP6VH3MV0A2C.png"
      },
      {
        label: "报事类",
        des: "噪音/公共卫生等事件需物业处理",
        type: "Incident",
        icon: "https://pay-prod-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01K84V9RGS3HS1G43RWFFTC4FZ.png"
      }
    ];
    const typeList = [
      {
        label: "公共区域报修",
        type: "CommonArea",
        icon: "https://pay-prod-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01K84WNKS9GNHQEV2EQ3N3HWW8.png"
      },
      {
        label: "房屋区域报修",
        type: "MyHome",
        icon: "https://pay-prod-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01K84XQQGNN7B30Q8S6RJMJGPS.png"
      }
    ];
    const handleToPage = (res) => {
      selectType.value = (res == null ? void 0 : res.type) || "";
      if ((res == null ? void 0 : res.label) === "报修类") {
        showPopup.value = true;
        return;
      }
      common_vendor.index.navigateTo({
        url: `/WORKORDER/add/index?type=${res == null ? void 0 : res.type}&location=CommonArea`
      });
    };
    const handleSelectType = (res) => {
      common_vendor.index.navigateTo({
        url: `/WORKORDER/add/index?type=${selectType.value}&location=${res == null ? void 0 : res.type}`
      });
    };
    common_vendor.onHide(() => {
      showPopup.value = false;
    });
    return (_ctx, _cache) => {
      return {
        a: common_vendor.o(($event) => handleSubmissionRecord("/WORKORDER/list_log/index")),
        b: common_vendor.o(($event) => handleSubmissionRecord("/WORKORDER/list/index")),
        c: common_vendor.f(list, (i, index, i0) => {
          return {
            a: i.icon,
            b: common_vendor.t(i.label),
            c: common_vendor.t(i.des),
            d: "090f2c6e-0-" + i0,
            e: `item_${index}`,
            f: common_vendor.o(($event) => handleToPage(i), `item_${index}`)
          };
        }),
        d: common_vendor.p({
          type: "right",
          color: "#999",
          size: "16"
        }),
        e: common_vendor.f(typeList, (i, index, i0) => {
          return {
            a: i.icon,
            b: common_vendor.t(i.label),
            c: "090f2c6e-2-" + i0 + ",090f2c6e-1",
            d: `item_${index}`,
            e: common_vendor.o(($event) => handleSelectType(i), `item_${index}`)
          };
        }),
        f: common_vendor.p({
          type: "right",
          color: "#999",
          size: "16"
        }),
        g: common_vendor.o(handleClose),
        h: common_vendor.p({
          show: showPopup.value,
          mode: "bottom",
          closeable: true,
          round: 20
        })
      };
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/ME/work_order_home/index.vue"]]);
wx.createPage(MiniProgramPage);
