"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _config = require("../../config");
var _vmMap = _interopRequireDefault(require("../../../vm-map"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var Left = function Left(_ref) {
  var classPrefix = _ref.classPrefix,
    mapPoints = _ref.mapPoints,
    _ref$mapLayers = _ref.mapLayers,
    mapLayers = _ref$mapLayers === void 0 ? [] : _ref$mapLayers,
    _ref$currentLayer = _ref.currentLayer,
    currentLayer = _ref$currentLayer === void 0 ? {} : _ref$currentLayer,
    _ref$legend = _ref.legend,
    legend = _ref$legend === void 0 ? [] : _ref$legend,
    clickGraphic = _ref.clickGraphic,
    _ref$customMapInfo = _ref.customMapInfo,
    customMapInfo = _ref$customMapInfo === void 0 ? {} : _ref$customMapInfo;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(classPrefix, "-left")
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(classPrefix, "-left-map")
  }, /*#__PURE__*/_react["default"].createElement(_vmMap["default"], Object.assign({
    mapPolygons: mapLayers,
    mapPoints: mapPoints,
    currentLayer: currentLayer,
    clickGraphic: clickGraphic
  }, customMapInfo))), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(classPrefix, "-left-legend")
  }, legend === null || legend === void 0 ? void 0 : legend.map(function (item, index) {
    return /*#__PURE__*/_react["default"].createElement("div", {
      className: "".concat(classPrefix, "-legendItem"),
      key: index
    }, /*#__PURE__*/_react["default"].createElement("div", {
      className: "".concat(classPrefix, "-icon")
    }, /*#__PURE__*/_react["default"].createElement("div", {
      className: "".concat(classPrefix, "-iconColor"),
      style: {
        background: (0, _config.getColor)(item.typeCode),
        opacity: 0.7
      }
    })), /*#__PURE__*/_react["default"].createElement("div", {
      className: "".concat(classPrefix, "-name")
    }, item.typeName));
  })));
};
var _default = exports["default"] = Left;
//# sourceMappingURL=Left.js.map
