"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _MyCollapse = _interopRequireDefault(require("../MyCollapse"));
var _useGetFacility2 = _interopRequireDefault(require("../../_mapUtil/useGetFacility"));
var _DetailItems = _interopRequireDefault(require("../DetailItems"));
var _config = _interopRequireDefault(require("../../config"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var Panel = _MyCollapse["default"].Panel;
var DistrictDeatil = function DistrictDeatil(_ref) {
  var _config$districtLevel;
  var id = _ref.id;
  var _useGetFacility = (0, _useGetFacility2["default"])(id),
    data = _useGetFacility.data;
  var name = data.name,
    divisionName = data.divisionName,
    _data$dataJson = data.dataJson,
    dataJson = _data$dataJson === void 0 ? {} : _data$dataJson,
    facilityGradeName = data.facilityGradeName,
    manageUnitName = data.manageUnitName;
  var population = dataJson.population,
    area = dataJson.area,
    level = dataJson.level,
    sewagePlantName = dataJson.sewagePlantName;
  return /*#__PURE__*/_react["default"].createElement(_MyCollapse["default"], {
    defaultActiveKey: ['1']
  }, /*#__PURE__*/_react["default"].createElement(Panel, {
    header: "\u57FA\u672C\u4FE1\u606F",
    key: '1'
  }, /*#__PURE__*/_react["default"].createElement(_DetailItems["default"], {
    items: [{
      label: '片区名称',
      value: name,
      span: 8
    }, {
      label: '片区等级',
      value: level ? (_config$districtLevel = _config["default"].districtLevelList.find(function (v) {
        return v.key == level;
      })) === null || _config$districtLevel === void 0 ? void 0 : _config$districtLevel.value : facilityGradeName,
      span: 8
    }, {
      label: '行政区划',
      value: divisionName,
      span: 8
    }, {
      label: '管理单位',
      value: manageUnitName,
      span: 8
    }, {
      label: '关联污水厂',
      value: sewagePlantName,
      span: 8
    }, {
      label: '片区人口数',
      value: population,
      span: 8
    }, {
      label: '片区面积',
      value: area ? area + 'm³' : null,
      span: 8
    }]
  })));
};
DistrictDeatil.propTypes = {
  id: _propTypes["default"].string
};
var _default = exports["default"] = DistrictDeatil;
//# sourceMappingURL=index.js.map
