import { jsx as l } from "react/jsx-runtime";
import r from "react";
import { map as g } from "es-toolkit/compat";
import f from "../../../../utils/classNames.js";
import u from "./settings/builtinSettings/MapTypeSettings.js";
import M from "./settings/builtinSettings/MapLayerSettings.js";
import S from "./settings/builtinSettings/MapClusterSettings.js";
import { useMapContext as C } from "../MapContext.js";
const k = (t) => t.type === u, U = (t) => t.type === M, d = (t) => t.type === S, N = (t) => {
  const { options: a, className: s = "" } = t, { baseLayer: n, activeLayers: m, showCluster: p, onMapTypeChange: o, onMapLayerChange: y, onShowClusterChange: c } = C(), i = f("MapSettingsWrapper", s);
  return /* @__PURE__ */ l("div", { className: i, children: g(a, (e) => k(e) ? r.cloneElement(e, {
    key: e?.key ?? crypto.randomUUID(),
    mapType: n,
    onMapTypeChange: o
  }) : U(e) ? r.cloneElement(e, {
    key: e?.key ?? crypto.randomUUID(),
    activeBuiltinLayers: m,
    onMapLayerChange: y
  }) : d(e) ? r.cloneElement(e, {
    key: e?.key ?? crypto.randomUUID(),
    showCluster: p,
    onShowClusterChange: c
  }) : r.cloneElement(e, {
    key: e?.key ?? `MapSettingsOption_${crypto.randomUUID()}`
  })) });
};
export {
  N as default
};
//# sourceMappingURL=MapSettings.js.map
