import { j as u } from "./jsx-runtime-NmMXPjeo.js";
import { B as j, I as M, C as S, o as v, p as L, q as O } from "./Toggle-5mHDjpoq.js";
import { L as y } from "./Link-JqnVqm-T.js";
import { C as i } from "./css-M9deYuc0.js";
import { createContext as N, useContext as b } from "react";
const l = N({
  onClick: () => {
  },
  selected: ""
}), C = () => b(l), z = ({
  children: n,
  onChange: e,
  level: s,
  iconSpacing: o,
  value: c = ""
}) => {
  const t = (r) => e == null ? void 0 : e(r);
  return /* @__PURE__ */ u.jsx(
    l.Provider,
    {
      value: { onClick: t, selected: c, level: s, iconSpacing: o },
      children: n
    }
  );
}, a = (n, e) => (
  // eslint-disable-next-line react/display-name
  (s) => {
    const { itemKey: o, className: c, onClick: t, size: r, ...p } = {
      ...e,
      ...s
    }, { onClick: d, selected: k, level: I, iconSpacing: T } = C(), f = (_) => {
      d(o), t == null || t(_);
    }, E = k === o;
    return (
      // @ts-expect-error
      /* @__PURE__ */ u.jsx(
        n,
        {
          level: I,
          ...p,
          onClick: f,
          variant: "text",
          className: i(i.B("menu-item"), i.selected(E), c),
          size: r ?? T
        }
      )
    );
  }
), x = a(j, { noWrap: !0 }), B = a(M), P = a(y, { noWrap: !0 }), m = x;
m.Icon = B;
m.Link = P;
const D = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  CONTEXT_SELECTED: S,
  CONTEXT_TARGET: v,
  ContextMenu: L,
  CoreItem: x,
  Item: m,
  Menu: z,
  MenuContext: l,
  useContextMenu: O,
  useMenuContext: C
}, Symbol.toStringTag, { value: "Module" }));
export {
  D as e
};
//# sourceMappingURL=external-lDOupZWO.js.map
