import { s as u, v as c, w as p, x as j, A as m, y as i, J as d, z as S, G as f, H as g, I as h } from "./main-mGfIFfsW.js";
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
import "./css-BUXMI9PB.js";
import { T as y } from "./Toggle-CzRMXK-K.js";
import "react";
import { u as T } from "./useKeysData-B1kiZOOw.js";
import "./eraser-BcLVtorx.js";
import "react-dom";
const I = ({
  keys: t,
  value: s,
  onChange: o,
  allowNone: n,
  multiple: r,
  ...a
}) => {
  const x = T(t);
  return /* @__PURE__ */ e.jsx(
    u,
    {
      closeDialogOnSelect: !1,
      ...x,
      allowNone: n,
      multiple: r,
      value: s,
      onChange: o,
      children: /* @__PURE__ */ e.jsx(c, { pack: !0, ...a })
    }
  );
}, l = ({
  itemKey: t,
  ...s
}) => {
  const { setSelected: o } = p(), { selected: n, onSelect: r } = j(t);
  return /* @__PURE__ */ e.jsx(
    y,
    {
      ...s,
      onChange: r,
      value: n,
      onContextMenu: (a) => {
        o([t]), a.preventDefault();
      }
    }
  );
}, v = ({
  value: t,
  ...s
}) => /* @__PURE__ */ e.jsxs(I, { ...s, value: t, keys: m, children: [
  /* @__PURE__ */ e.jsx(l, { itemKey: "start", children: /* @__PURE__ */ e.jsx(i.Left, {}) }),
  /* @__PURE__ */ e.jsx(l, { itemKey: "center", children: /* @__PURE__ */ e.jsx(i.Center, {}) }),
  /* @__PURE__ */ e.jsx(l, { itemKey: "end", children: /* @__PURE__ */ e.jsx(i.Right, {}) })
] }), M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  ALIGNMENTS: m,
  Box: c,
  JUSTIFICATIONS: d,
  SelectAlignment: v,
  alignmentZ: S,
  justificationZ: f,
  parseDirection: g,
  shouldReverse: h
}, Symbol.toStringTag, { value: "Module" }));
export {
  I as B,
  v as S,
  l as a,
  M as e
};
