"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = Rules;
var _react = _interopRequireDefault(require("react"));
var _vmNodata = _interopRequireDefault(require("../../../vm-nodata"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * 收集点-总览信息-收运规则
 */

function Rules(props) {
  var rules = props.rules;
  var getImgCode = function getImgCode(name) {
    var code = 'qt';
    switch (name) {
      case '其他垃圾':
        code = 'qt';
        break;
      case '厨余垃圾':
        code = 'cy';
        break;
      case '有害垃圾':
        code = 'yh';
        break;
      case '可回收物':
        code = 'khsw';
        break;
      default:
        code = 'qt';
        break;
    }
    return code;
  };
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, Array.isArray(rules) ? rules.map(function (ele, index) {
    return /*#__PURE__*/_react["default"].createElement("div", {
      className: "syrules-item",
      key: index
    }, /*#__PURE__*/_react["default"].createElement("div", {
      className: "syrules-item--name ".concat(getImgCode((ele === null || ele === void 0 ? void 0 : ele.productTypeName) || ''))
    }, (ele === null || ele === void 0 ? void 0 : ele.productTypeName) || '--'), /*#__PURE__*/_react["default"].createElement("div", {
      className: "syrules-item--content"
    }, /*#__PURE__*/_react["default"].createElement("div", null, (ele === null || ele === void 0 ? void 0 : ele.ruleTypeStr) || '--'), /*#__PURE__*/_react["default"].createElement("div", null, (ele === null || ele === void 0 ? void 0 : ele.bucketNum) || 0, "\u4E2A\u6876"), /*#__PURE__*/_react["default"].createElement("div", null, (ele === null || ele === void 0 ? void 0 : ele.carCodes) || '--')));
  }) : /*#__PURE__*/_react["default"].createElement(_vmNodata["default"], null));
}
//# sourceMappingURL=Rules.js.map
