import { jsx as e, jsxs as S } from "react/jsx-runtime";
import { noop as p } from "es-toolkit/function";
import { compact as T } from "es-toolkit/compat";
import f from "../MapSettingsPanel.js";
import C from "../MapSettingsItem.js";
import g from "../MapSettingsTile.js";
import { MapIcon as t, NO_CLUSTER_INACTIVE as u, CLUSTER_INACTIVE as I, CLUSTER_ACTIVE as E, NO_CLUSTER_ACTIVE as A } from "../../../../icons/MapIcon.js";
import L from "../items/MapSettingsDropdownHeader.js";
const V = (d) => {
  const {
    showCluster: a = !0,
    onShowClusterChange: b = p,
    onToggle: v = p,
    clusterEnabledLabel: o,
    clusterDisabledLabel: n,
    dropdownHeaderText: s,
    ...M
  } = d, r = (m) => {
    b(m), v(m);
  }, l = !!o || !!n, N = s && /* @__PURE__ */ e(L, { label: s }, "mapClusterDropdownHeader"), i = /* @__PURE__ */ e(
    C,
    {
      onClick: () => r(!0),
      isActive: a,
      activeIcon: /* @__PURE__ */ e(t, { name: E, className: "MapClusterIcon" }),
      inactiveIcon: /* @__PURE__ */ e(t, { name: I, className: "MapClusterIconInactive" }),
      label: o
    },
    "enableClusterButtons"
  ), c = /* @__PURE__ */ e(
    C,
    {
      onClick: () => r(!1),
      isActive: !a,
      activeIcon: /* @__PURE__ */ e(t, { name: A, className: "MapNoClusterIcon" }),
      inactiveIcon: /* @__PURE__ */ e(t, { name: u, className: "MapNoClusterIconInactive" }),
      label: n
    },
    "disableClusterButton"
  );
  return /* @__PURE__ */ e(
    g,
    {
      className: "MapClusterSettings",
      isActive: a,
      activeIcon: /* @__PURE__ */ e(t, { name: I }),
      inactiveIcon: /* @__PURE__ */ e(t, { name: u }),
      items: l ? T([N, i, c]) : void 0,
      panel: !l && /* @__PURE__ */ S(f, { children: [
        i,
        c
      ] }),
      ...M
    }
  );
};
export {
  V as default
};
//# sourceMappingURL=MapClusterSettings.js.map
