"use strict";var stringUtil=require("./stringUtil-1ce2e674.js"),React=require("react"),classNames=require("classnames");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function _interopNamespace(s){if(s&&s.__esModule)return s;var i=Object.create(null);return s&&Object.keys(s).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(s,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return s[e]}}))}),i.default=s,Object.freeze(i)}var React__namespace=_interopNamespace(React),classNames__default=_interopDefaultLegacy(classNames),__assign=function(){return(__assign=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++)for(var a in t=arguments[s])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},__rest=function(e,t){var s={};for(a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(s[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(s[a[i]]=e[a[i]]);return s},prefixCls="dmc-map-base-change",DIVIDER_ID="divider",GroupItem=React__namespace.memo(function(e){var t=e.id,s=e.className,i=e.onClick,a=e.img,n=e.name,e=__rest(e,["id","className","onClick","img","name"]),a={backgroundImage:"url("+a+")"},r="dark"===t,l="light"===t;return stringUtil.jsxRuntime.exports.jsxs("div",__assign({},e,{className:classNames__default.default(prefixCls+"-content-style",s),style:a,title:n},{children:[stringUtil.jsxRuntime.exports.jsx("div",{onClick:function(){var e;i&&i(l&&e?"lightlabel":r&&e?"darklabel":t)},style:{width:"100%",height:"100%"}},void 0),stringUtil.jsxRuntime.exports.jsx("div",__assign({className:prefixCls+"-content-style-label"},{children:stringUtil.jsxRuntime.exports.jsx("div",{children:n},void 0)}),void 0)]}),void 0)}),MapBaseChange=React__namespace.memo(function(e){var t=e.className,s=e.headerTitle,i=e.hideBase,a=e.groupOptions,a=void 0===a?[]:a,n=e.onClose,r=e.currentStyle,l=e.onChange,c=e.changeHideBase,e=__rest(e,["className","headerTitle","hideBase","groupOptions","onClose","currentStyle","onChange","changeHideBase"]);return stringUtil.jsxRuntime.exports.jsxs("div",__assign({},e,{className:classNames__default.default(prefixCls,t)},{children:[stringUtil.jsxRuntime.exports.jsxs("div",__assign({className:classNames__default.default(prefixCls+"-header")},{children:[stringUtil.jsxRuntime.exports.jsx(stringUtil.Checkbox,{title:null!=s?s:"-",checked:i,onChange:c},void 0),stringUtil.jsxRuntime.exports.jsx(stringUtil.IconButton,{icon:"close",type:"only-icon",onClick:n},void 0)]}),void 0),0<a.length&&stringUtil.jsxRuntime.exports.jsx("div",__assign({className:classNames__default.default(prefixCls+"-content")},{children:stringUtil.map_1(a,function(e){var t,s=e.id,i=e.name,a=e.img;if(s===DIVIDER_ID)return stringUtil.jsxRuntime.exports.jsx("div",{className:classNames__default.default(prefixCls+"-line")},s);e=r===e.id,e=classNames__default.default(prefixCls+"-group-item",((t={})[prefixCls+"-selected"]=e,t));return stringUtil.jsxRuntime.exports.jsx(GroupItem,{id:s,name:i+s,img:a,className:e,onClick:l},s)})}),void 0)]}),void 0)});exports.MapBaseChange=MapBaseChange;
