"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _vmSubTitle = _interopRequireDefault(require("../../../vm-sub-title"));
var _traffic = _interopRequireDefault(require("../../imgs/traffic.png"));
var _stench = _interopRequireDefault(require("../../imgs/stench.png"));
var _temperature = _interopRequireDefault(require("../../imgs/temperature.png"));
var _humidity = _interopRequireDefault(require("../../imgs/humidity.png"));
var _water = _interopRequireDefault(require("../../imgs/water.png"));
var _electric = _interopRequireDefault(require("../../imgs/electric.png"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function Situation(props) {
  var situationRes = props.situationRes;
  var data = [{
    monitorType: 'PersonNum',
    name: '人流量',
    unit: '人次',
    imgSrc: _traffic["default"],
    value: 0
  }, {
    monitorType: 'OdorValue',
    name: '臭气值',
    unit: 'PPm',
    imgSrc: _stench["default"],
    value: 0
  }, {
    monitorType: 'temperature',
    name: '温度',
    unit: '℃',
    imgSrc: _temperature["default"],
    value: 0
  }, {
    monitorType: 'humidity',
    name: '湿度',
    unit: '%',
    imgSrc: _humidity["default"],
    value: 0
  }, {
    monitorType: 'WaterUse',
    name: '用水量',
    unit: '吨',
    imgSrc: _water["default"],
    value: 0
  }, {
    monitorType: 'ElecUse',
    name: '用电量',
    unit: '度',
    imgSrc: _electric["default"],
    value: 0
  }];
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "base-bottom-left"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u5B9E\u65F6\u8FD0\u884C\u60C5\u51B5"
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "base-bottom-situation"
  }, data.map(function (item) {
    var _a;
    var name = item.name,
      unit = item.unit,
      imgSrc = item.imgSrc;
    return /*#__PURE__*/_react["default"].createElement("div", {
      className: "base-bottom-situation--item",
      key: item.monitorType
    }, /*#__PURE__*/_react["default"].createElement("img", {
      src: imgSrc
    }), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
      className: "base-bottom-situation--item-name"
    }, name), /*#__PURE__*/_react["default"].createElement("div", {
      className: "base-bottom-situation--item-value"
    }, /*#__PURE__*/_react["default"].createElement("span", null, ((_a = situationRes.find(function (ele) {
      return ele.monitorType === item.monitorType;
    })) === null || _a === void 0 ? void 0 : _a.value) || 0), unit)));
  })));
}
var _default = Situation;
exports["default"] = _default;
//# sourceMappingURL=Situation.js.map
