"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _mapSearch = _interopRequireDefault(require("./map-search"));
var _layerControl = _interopRequireDefault(require("./layer-control"));
var _dimensionSwitch = _interopRequireDefault(require("./dimension-switch"));
var _baseMapSwitch = _interopRequireDefault(require("./base-map-switch"));
var _toolsItem = _interopRequireDefault(require("./tools-item"));
var _classnames = _interopRequireDefault(require("classnames"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var Tools = function Tools(props) {
  var style = props.style,
    _props$mapSearch = props.mapSearch,
    mapSearch = _props$mapSearch === void 0 ? {} : _props$mapSearch,
    _props$layerControl = props.layerControl,
    layerControl = _props$layerControl === void 0 ? {} : _props$layerControl,
    _props$dimensionSwitc = props.dimensionSwitch,
    dimensionSwitch = _props$dimensionSwitc === void 0 ? {} : _props$dimensionSwitc,
    _props$baseMapSwitch = props.baseMapSwitch,
    baseMapSwitch = _props$baseMapSwitch === void 0 ? {} : _props$baseMapSwitch,
    children = props.children;
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("ul", {
    className: (0, _classnames["default"])('cs-tools'),
    style: style
  }, (mapSearch === null || mapSearch === void 0 ? void 0 : mapSearch.show) && /*#__PURE__*/_react["default"].createElement(_mapSearch["default"], mapSearch), (dimensionSwitch === null || dimensionSwitch === void 0 ? void 0 : dimensionSwitch.show) && /*#__PURE__*/_react["default"].createElement(_dimensionSwitch["default"], _extends({}, mapSearch, dimensionSwitch)), (baseMapSwitch === null || baseMapSwitch === void 0 ? void 0 : baseMapSwitch.show) && /*#__PURE__*/_react["default"].createElement(_baseMapSwitch["default"], mapSearch), (layerControl === null || layerControl === void 0 ? void 0 : layerControl.show) && /*#__PURE__*/_react["default"].createElement(_layerControl["default"], layerControl), children));
};
Tools.Item = _toolsItem["default"];
Tools.defaultProps = {
  mapSearch: {
    show: true
  },
  dimensionSwitch: {
    show: false
  },
  baseMapSwitch: {
    show: false
  },
  layerControl: {
    show: true,
    showAll: true
  }
};
var _default = Tools;
exports["default"] = _default;
//# sourceMappingURL=index.js.map
