"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _antd = require("antd");
var _MyTag = _interopRequireDefault(require("../_component/MyTag"));
var _config = require("./config");
var _classnames = _interopRequireDefault(require("classnames"));
var _StatusBg = _interopRequireDefault(require("./StatusBg"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var prefix = 'ol-map-analysis-sunny-rain-ratio-status';
var Status = function Status(_ref) {
  var _ref$info = _ref.info,
    info = _ref$info === void 0 ? {} : _ref$info;
  var _info$facility = info.facility,
    facility = _info$facility === void 0 ? {} : _info$facility,
    ratio = info.ratio,
    isAlarm = info.isAlarm,
    id = info.id;
  var typeCode = facility.typeCode;
  return /*#__PURE__*/_react["default"].createElement(_antd.Space, null, /*#__PURE__*/_react["default"].createElement(_MyTag["default"], {
    color: _config.facilityTypeColorMap[typeCode],
    text: _config.facilityTypeMap[typeCode]
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])(prefix, {
      error: isAlarm
    })
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "-bg")
  }, /*#__PURE__*/_react["default"].createElement(_StatusBg["default"], {
    isAlarm: isAlarm,
    id: id
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "-label")
  }, "\u6674\u96E8\u6BD4")), /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])("".concat(prefix, "-number"), {
      error: isAlarm
    })
  }, ratio)));
};
var _default = exports["default"] = Status;
//# sourceMappingURL=Status.js.map
