"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _config = require("./config");
var _olMap = require("@vtx/ol-map");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var MapLayer = function MapLayer() {
  var group = Object.keys(_config.InfiltrationType).map(function (key) {
    return {
      name: _config.InfiltrationTypeName[_config.InfiltrationType[key]],
      key: "INFILTRATION_GW_".concat(_config.InfiltrationType[key]),
      color: _config.InfiltrationTypeColor[_config.InfiltrationType[key]],
      icon: _config.InfiltrationTypeIcon[_config.InfiltrationType[key]],
      filter: function filter(f) {
        return f.infiltrationType === _config.InfiltrationType[key];
      }
    };
  });
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_olMap.FeatureLayer, {
    id: "test",
    data: [],
    name: 'test',
    show: true,
    zIndex: 60,
    layerControl: false,
    group: group.map(function (_ref) {
      var name = _ref.name,
        key = _ref.key,
        filter = _ref.filter,
        color = _ref.color,
        icon = _ref.icon;
      return {
        name: name,
        key: key,
        style: {
          type: 'Marker',
          style: {
            icon: icon,
            color: color,
            type: 'CommonIcon'
          }
        },
        filter: filter
      };
    })
  }));
};
MapLayer.propTypes = {
  data: _propTypes["default"].array
};
var _default = exports["default"] = MapLayer;
//# sourceMappingURL=MapLayer.js.map
