"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _MyTag = _interopRequireDefault(require("../_component/MyTag"));
var _antd = require("antd");
var _config = _interopRequireDefault(require("../_mapUtil/config"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var Status = function Status(_ref) {
  var _ref$rules = _ref.rules,
    rules = _ref$rules === void 0 ? {} : _ref$rules,
    _ref$info = _ref.info,
    info = _ref$info === void 0 ? {} : _ref$info;
  var level = info.level,
    _info$facility = info.facility,
    facility = _info$facility === void 0 ? {} : _info$facility;
  var facilityClassCode = facility.facilityClassCode,
    facilityClassName = facility.facilityClassName;
  var rule = rules[level] || {};
  var name = rule.name,
    color = rule.color;
  return /*#__PURE__*/_react["default"].createElement(_antd.Space, null, /*#__PURE__*/_react["default"].createElement(_MyTag["default"], {
    text: facilityClassName,
    color: _config["default"].gwColorMap[facilityClassCode]
  }), /*#__PURE__*/_react["default"].createElement(_MyTag["default"], {
    text: name,
    color: color
  }));
};
Status.propTypes = {
  rules: _propTypes["default"].object,
  info: _propTypes["default"].object
};
var _default = exports["default"] = Status;
//# sourceMappingURL=Status.js.map
