"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _vmEmpty = _interopRequireDefault(require("../../../vm-empty"));
var _util = require("../../../util");
var _lodash = require("lodash");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var Rules = function Rules(props) {
  var rules = props.rules,
    workTypeColorMap = props.workTypeColorMap;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "road_work_rule_wrap"
  }, Array.isArray(rules) && !(0, _lodash.isEmpty)(rules) ? rules.filter(function (item) {
    return item.beenLaunch;
  }).map(function (item, index) {
    return /*#__PURE__*/_react["default"].createElement("div", {
      key: index,
      className: "rule_item"
    }, /*#__PURE__*/_react["default"].createElement("div", {
      className: "rule_item_left"
    }, /*#__PURE__*/_react["default"].createElement("div", {
      className: "rule_type",
      style: {
        color: workTypeColorMap[item.workTypeName],
        background: (0, _util.transformRgb)(workTypeColorMap[item.workTypeName], 0.1)
      }
    }, item.workTypeName || '--'), /*#__PURE__*/_react["default"].createElement("img", {
      src: require('../../imgs/arrow.png'),
      className: "rule_arrow"
    }), /*#__PURE__*/_react["default"].createElement("div", null, item.workCount || '--', "\u8D9F")), /*#__PURE__*/_react["default"].createElement("div", null, "".concat(item.workStartTime, "-").concat(item.workEndTime)));
  }) : (/*#__PURE__*/_react["default"].createElement(_vmEmpty["default"], {
    imgStyle: {
      marginLeft: 0,
      transform: 'translateX(0%)'
    }
  })));
};
var _default = exports["default"] = Rules;
//# sourceMappingURL=Rules.js.map
