import * as e from "react";
import s from "../../../../../../../../../_virtual/index9.js";
import { Root as S, Trigger as R, Portal as p, Content as B, Group as y, Label as w, Item as T, Separator as v, Sub as G, SubTrigger as P, SubContent as k, CheckboxItem as L, ItemIndicator as I, RadioGroup as z, RadioItem as $ } from "../../../../../../../@radix-ui_react-context-menu@2.2.1_@types_react-dom@18.3.6_@types_react@18.3.3__@types__d263c35d91177f9c0aa19ac44f94cdfd/node_modules/@radix-ui/react-context-menu/dist/index.js";
import { Slottable as M } from "../../../../../../../@radix-ui_react-slot@1.1.0_@types_react@18.3.3_react@18.3.0-canary-3d9b20132-20240124/node_modules/@radix-ui/react-slot/dist/index.js";
import { ScrollArea as h } from "./scroll-area.js";
import { baseMenuContentPropDefs as m, baseMenuItemPropDefs as D, baseMenuCheckboxItemPropDefs as V, baseMenuRadioItemPropDefs as O } from "./base-menu.props.js";
import { useThemeContext as q, Theme as x } from "./theme.js";
import { ThickChevronRightIcon as A, ThickCheckIcon as N } from "./icons.js";
import { extractProps as b } from "../helpers/extract-props.js";
import { requireReactElement as H } from "../helpers/require-react-element.js";
const W = (t) => e.createElement(S, { ...t });
W.displayName = "ContextMenu.Root";
const j = e.forwardRef(({ children: t, ...r }, a) => e.createElement(R, { ...r, ref: a, asChild: !0 }, H(t)));
j.displayName = "ContextMenu.Trigger";
const E = e.createContext({}), F = e.forwardRef((t, r) => {
  const a = q(), { size: o = m.size.default, variant: n = m.variant.default, highContrast: c = m.highContrast.default } = t, { className: l, children: u, color: i, container: d, forceMount: C, ...g } = b(t, m), f = i || a.accentColor;
  return e.createElement(p, { container: d, forceMount: C }, e.createElement(x, { asChild: !0 }, e.createElement(B, { "data-accent-color": f, alignOffset: -Number(o) * 4, collisionPadding: 10, ...g, asChild: !1, ref: r, className: s("rt-PopperContent", "rt-BaseMenuContent", "rt-ContextMenuContent", l) }, e.createElement(h, { type: "auto" }, e.createElement("div", { className: s("rt-BaseMenuViewport", "rt-ContextMenuViewport") }, e.createElement(E.Provider, { value: e.useMemo(() => ({ size: o, variant: n, color: f, highContrast: c }), [o, n, f, c]) }, u))))));
});
F.displayName = "ContextMenu.Content";
const J = e.forwardRef(({ className: t, ...r }, a) => e.createElement(w, { ...r, asChild: !1, ref: a, className: s("rt-BaseMenuLabel", "rt-ContextMenuLabel", t) }));
J.displayName = "ContextMenu.Label";
const K = e.forwardRef((t, r) => {
  const { className: a, children: o, color: n = D.color.default, shortcut: c, ...l } = t;
  return e.createElement(T, { "data-accent-color": n, ...l, ref: r, className: s("rt-reset", "rt-BaseMenuItem", "rt-ContextMenuItem", a) }, e.createElement(M, null, o), c && e.createElement("div", { className: "rt-BaseMenuShortcut rt-ContextMenuShortcut" }, c));
});
K.displayName = "ContextMenu.Item";
const Q = e.forwardRef(({ className: t, ...r }, a) => e.createElement(y, { ...r, asChild: !1, ref: a, className: s("rt-BaseMenuGroup", "rt-ContextMenuGroup", t) }));
Q.displayName = "ContextMenu.Group";
const U = e.forwardRef(({ className: t, ...r }, a) => e.createElement(z, { ...r, asChild: !1, ref: a, className: s("rt-BaseMenuRadioGroup", "rt-ContextMenuRadioGroup", t) }));
U.displayName = "ContextMenu.RadioGroup";
const X = e.forwardRef((t, r) => {
  const { children: a, className: o, color: n = O.color.default, ...c } = t;
  return e.createElement($, { ...c, asChild: !1, ref: r, "data-accent-color": n, className: s("rt-BaseMenuItem", "rt-BaseMenuRadioItem", "rt-ContextMenuItem", "rt-ContextMenuRadioItem", o) }, e.createElement(M, null, a), e.createElement(I, { className: "rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator" }, e.createElement(N, { className: "rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon" })));
});
X.displayName = "ContextMenu.RadioItem";
const Y = e.forwardRef((t, r) => {
  const { children: a, className: o, shortcut: n, color: c = V.color.default, ...l } = t;
  return e.createElement(L, { ...l, asChild: !1, ref: r, "data-accent-color": c, className: s("rt-BaseMenuItem", "rt-BaseMenuCheckboxItem", "rt-ContextMenuItem", "rt-ContextMenuCheckboxItem", o) }, e.createElement(M, null, a), e.createElement(I, { className: "rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator" }, e.createElement(N, { className: "rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon" })), n && e.createElement("div", { className: "rt-BaseMenuShortcut rt-ContextMenuShortcut" }, n));
});
Y.displayName = "ContextMenu.CheckboxItem";
const Z = (t) => e.createElement(G, { ...t });
Z.displayName = "ContextMenu.Sub";
const _ = e.forwardRef((t, r) => {
  const { className: a, children: o, ...n } = t;
  return e.createElement(P, { ...n, asChild: !1, ref: r, className: s("rt-BaseMenuItem", "rt-BaseMenuSubTrigger", "rt-ContextMenuItem", "rt-ContextMenuSubTrigger", a) }, o, e.createElement("div", { className: "rt-BaseMenuShortcut rt-ContextMenuShortcut" }, e.createElement(A, { className: "rt-BaseMenuSubTriggerIcon rt-ContextMenuSubTriggerIcon" })));
});
_.displayName = "ContextMenu.SubTrigger";
const ee = e.forwardRef((t, r) => {
  const { size: a, variant: o, color: n, highContrast: c } = e.useContext(E), { className: l, children: u, container: i, forceMount: d, ...C } = b({ size: a, variant: o, color: n, highContrast: c, ...t }, m);
  return e.createElement(p, { container: i, forceMount: d }, e.createElement(x, { asChild: !0 }, e.createElement(k, { "data-accent-color": n, alignOffset: -Number(a) * 4, sideOffset: 1, collisionPadding: 10, ...C, asChild: !1, ref: r, className: s("rt-PopperContent", "rt-BaseMenuContent", "rt-BaseMenuSubContent", "rt-ContextMenuContent", "rt-ContextMenuSubContent", l) }, e.createElement(h, { type: "auto" }, e.createElement("div", { className: s("rt-BaseMenuViewport", "rt-ContextMenuViewport") }, u)))));
});
ee.displayName = "ContextMenu.SubContent";
const te = e.forwardRef(({ className: t, ...r }, a) => e.createElement(v, { ...r, asChild: !1, ref: a, className: s("rt-BaseMenuSeparator", "rt-ContextMenuSeparator", t) }));
te.displayName = "ContextMenu.Separator";
export {
  Y as CheckboxItem,
  F as Content,
  Q as Group,
  K as Item,
  J as Label,
  U as RadioGroup,
  X as RadioItem,
  W as Root,
  te as Separator,
  Z as Sub,
  ee as SubContent,
  _ as SubTrigger,
  j as Trigger
};
//# sourceMappingURL=context-menu.js.map
