"use strict";
const common_vendor = require("../../../common/vendor.js");
const common_libraries_userUserLogin = require("../../../common/libraries/userUserLogin.js");
const pages_index_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");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "Classification",
  props: [
    "item"
  ],
  setup(__props) {
    const props = __props;
    const goToPage = (url) => {
      var _a;
      if (url) {
        common_vendor.index.navigateTo({
          url: !((_a = common_libraries_userUserLogin.getUser) == null ? void 0 : _a.getLoginStatus()) ? "/pages/login" : url || ""
        });
      } else {
        common_vendor.index.showModal({
          title: "提示",
          content: "该功能暂未开放，敬请期待",
          confirmColor: "#0082FA",
          success: function(res) {
            if (res.confirm) {
              console.log("用户点击确定");
            } else if (res.cancel) {
              console.log("用户点击取消");
            }
          }
        });
      }
    };
    const list = [
      {
        label: "房屋缴费",
        icon: "house_icon.svg",
        url: "/CUSTOMER/list_house/index",
        key: ""
      },
      {
        label: "新增工单",
        icon: "workorder_icon.svg",
        url: "/ME/work_order_home/index",
        key: ""
      },
      {
        label: "任务中心",
        icon: "task_icon.svg",
        url: "/INDEX/task/list/index",
        key: "houseWorkOrderCount"
      },
      {
        label: "打卡考勤",
        icon: "CheckInIcon.svg",
        url: "/ME/attendance/my_schedules/index",
        key: ""
      },
      {
        label: "水印相机",
        icon: "WatermarkCamera.svg",
        url: "/INDEX/watermark_camera/index",
        key: ""
      },
      {
        label: "客户管理",
        icon: "user_icon.svg",
        url: "/CUSTOMER/list_user/index",
        key: ""
      },
      {
        label: "住户登记",
        icon: "household_registration.svg",
        url: "/CUSTOMER/bind_house_form/index",
        key: ""
      },
      {
        label: "仪表抄表",
        icon: "meter_reading_icon.svg",
        url: "/pages/public/asset_houses/index?type=meter",
        key: ""
        // url: '/ME/instrument/list/index'
      },
      // {
      //   label: '数据看板',
      //   icon: 'performance_icon.svg',
      //   url: '/pages/data_oard/index'
      // },
      // {
      //   label: '知识问答',
      //   icon: 'knowledge_icon.svg',
      //   url: '/ME/knowledge_qa/index'
      // },
      {
        label: "突发事件",
        icon: "emergency_icon.svg",
        url: "/ME/emergency/list/index",
        key: "emergencyEventCount"
      },
      {
        label: "项目公告",
        icon: "announcement.svg",
        url: "/ME/announcement/list/index",
        key: "unread_count"
      }
    ];
    const getJingangArea = (idx) => {
      return list[idx];
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.f(props == null ? void 0 : props.item, (i, index, i0) => {
          var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
          return common_vendor.e({
            a: `/static/svg/${(_a = getJingangArea(i == null ? void 0 : i.path)) == null ? void 0 : _a.icon}`,
            b: (i == null ? void 0 : i.key) && ((_e = (_c = (_b = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _b.IndexCount) == null ? void 0 : _c.value) == null ? void 0 : _e[(_d = getJingangArea(i == null ? void 0 : i.path)) == null ? void 0 : _d.key])
          }, (i == null ? void 0 : i.key) && ((_i = (_g = (_f = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _f.IndexCount) == null ? void 0 : _g.value) == null ? void 0 : _i[(_h = getJingangArea(i == null ? void 0 : i.path)) == null ? void 0 : _h.key]) ? {
            c: common_vendor.t(((_m = (_k = (_j = common_vendor.unref(pages_index_model.useModel)) == null ? void 0 : _j.IndexCount) == null ? void 0 : _k.value) == null ? void 0 : _m[(_l = getJingangArea(i == null ? void 0 : i.path)) == null ? void 0 : _l.key]) || 0)
          } : {}, {
            d: common_vendor.t((_n = getJingangArea(i == null ? void 0 : i.path)) == null ? void 0 : _n.label),
            e: `items_${index}`,
            f: common_vendor.o(($event) => {
              var _a2;
              return goToPage((_a2 = getJingangArea(i == null ? void 0 : i.path)) == null ? void 0 : _a2.url);
            }, `items_${index}`)
          });
        })
      };
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1833569a"], ["__file", "/Users/zsq/Sources/github/2025property-pay/pay-employee/src/pages/index/components/Classification.vue"]]);
wx.createComponent(Component);
