"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _vtxBaseModal = _interopRequireDefault(require("../vtx-base-modal"));
var _components = require("./components");
var _api = require("./api");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
var VtxHousingEstateModal = function VtxHousingEstateModal(props) {
  var _props$visible = props.visible,
    visible = _props$visible === void 0 ? false : _props$visible,
    onCancel = props.onCancel,
    _props$theme = props.theme,
    theme = _props$theme === void 0 ? 'dark' : _props$theme,
    id = props.id,
    _props$title = props.title,
    title = _props$title === void 0 ? '小区' : _props$title,
    customMapInfo = props.customMapInfo;
  var PREFIX = 'estate';
  // 小区基本信息
  var basicInfo = _api.overViewService.estateStatistics({
    housingEstateId: id
  });
  // 系统配置获取垃圾类型配置的图标
  var garbageIcons = _api.overViewService.getGarbageIcons();
  // 小区关联投放点
  var throwPoints = _api.overViewService.throwPoints({
    housingEstateId: id
  });
  // 小区业务包code
  var serviceList = (0, _api.getLoadEnumValue)(id) || [];
  var tabContents = {
    overview: (/*#__PURE__*/_react["default"].createElement(_components.OverView, {
      classPrefix: PREFIX,
      id: id,
      basicInfo: basicInfo,
      throwPoints: throwPoints,
      serviceList: serviceList,
      customMapInfo: customMapInfo,
      garbageIcons: garbageIcons
    })),
    wggs: (/*#__PURE__*/_react["default"].createElement(_components.WGGS, {
      classPrefix: PREFIX,
      id: id,
      throwPoints: throwPoints,
      serviceList: serviceList
    })),
    tfrd: /*#__PURE__*/_react["default"].createElement(_components.TFRD, {
      classPrefix: PREFIX,
      id: id
    }),
    alarm: /*#__PURE__*/_react["default"].createElement(_components.Alarm, {
      classPrefix: PREFIX,
      id: id
    }),
    wgxw: (/*#__PURE__*/_react["default"].createElement(_components.WGXW, {
      classPrefix: PREFIX,
      id: id,
      throwPoints: throwPoints,
      serviceList: serviceList
    }))
    // video: <SPJK classPrefix={PREFIX} videoPlaceCode={basicInfo?.name} />,
  };
  return /*#__PURE__*/_react["default"].createElement(_vtxBaseModal["default"], {
    title: title,
    theme: theme,
    tabs: [{
      key: 'overview',
      title: '综合总览'
    }, {
      key: 'wggs',
      title: '违规人公示'
    }].concat(_toConsumableArray(serviceList.includes('THROW') ? [{
      key: 'tfrd',
      title: '居民投放热度'
    }] : []), [{
      key: 'wgxw',
      title: '居民违规行为'
    }, {
      key: 'alarm',
      title: '报警事件分析'
    }
    // {
    //     key: 'video',
    //     title: '视频监控',
    // },
    ]),
    contents: tabContents,
    visible: visible,
    onCancel: onCancel
  });
};
var _default = exports["default"] = VtxHousingEstateModal;
//# sourceMappingURL=index.js.map
