import * as React from "react";
import y$1 from "../../../../../../../../../_virtual/index12.js";
import { ScrollArea as c } from "./scroll-area.js";
import { baseMenuContentPropDefs as n, baseMenuItemPropDefs as a$1, baseMenuCheckboxItemPropDefs as i, baseMenuRadioItemPropDefs as p } from "./_internal/base-menu.props.js";
import { useThemeContext as H, Theme as R$1 } from "./theme.js";
import { ThickChevronRightIcon as l, ThickCheckIcon as t } from "./icons.js";
import { extractProps as v$1 } from "../helpers/extract-props.js";
import { requireReactElement as a } from "../helpers/require-react-element.js";
import { Root as Root2, Trigger, Portal as Portal2, Content as Content2, Group as Group2, Label as Label2, Item as Item2, Separator as Separator2, Sub as Sub2, SubTrigger as SubTrigger2, SubContent as SubContent2, CheckboxItem as CheckboxItem2, ItemIndicator as ItemIndicator2, RadioGroup as RadioGroup2, RadioItem as RadioItem2 } from "../../../../../../../@radix-ui_react-context-menu@2.2.16_@types_react-dom@19.1.9_@types_react@19.1.13__@type_f2f8db22c631ec08c4b18f304bd48243/node_modules/@radix-ui/react-context-menu/dist/index.js";
import { Slottable } from "../../../../../../../@radix-ui_react-slot@1.2.3_@types_react@19.1.13_react@19.1.1/node_modules/@radix-ui/react-slot/dist/index.js";
const h = (t2) => React.createElement(Root2, { ...t2 });
h.displayName = "ContextMenu.Root";
const S = React.forwardRef(({ children: t2, ...n2 }, o) => React.createElement(Trigger, { ...n2, ref: o, asChild: true }, a(t2)));
S.displayName = "ContextMenu.Trigger";
const g = React.createContext({}), v = React.forwardRef((t2, n$1) => {
  const o = H(), { size: a2 = n.size.default, variant: u = n.variant.default, highContrast: i2 = n.highContrast.default } = t2, { className: C, children: m, color: x, container: M, forceMount: l2, ...L } = v$1(t2, n), c$1 = x || o.accentColor;
  return React.createElement(Portal2, { container: M, forceMount: l2 }, React.createElement(R$1, { asChild: true }, React.createElement(Content2, { "data-accent-color": c$1, alignOffset: -Number(a2) * 4, collisionPadding: 10, ...L, asChild: false, ref: n$1, className: y$1("rt-PopperContent", "rt-BaseMenuContent", "rt-ContextMenuContent", C) }, React.createElement(c, { type: "auto" }, React.createElement("div", { className: y$1("rt-BaseMenuViewport", "rt-ContextMenuViewport") }, React.createElement(g.Provider, { value: React.useMemo(() => ({ size: a2, variant: u, color: c$1, highContrast: i2 }), [a2, u, c$1, i2]) }, m))))));
});
v.displayName = "ContextMenu.Content";
const y = React.forwardRef(({ className: t2, ...n2 }, o) => React.createElement(Label2, { ...n2, asChild: false, ref: o, className: y$1("rt-BaseMenuLabel", "rt-ContextMenuLabel", t2) }));
y.displayName = "ContextMenu.Label";
const R = React.forwardRef((t2, n2) => {
  const { className: o, children: a2, color: u = a$1.color.default, shortcut: i2, ...C } = t2;
  return React.createElement(Item2, { "data-accent-color": u, ...C, ref: n2, className: y$1("rt-reset", "rt-BaseMenuItem", "rt-ContextMenuItem", o) }, React.createElement(Slottable, null, a2), i2 && React.createElement("div", { className: "rt-BaseMenuShortcut rt-ContextMenuShortcut" }, i2));
});
R.displayName = "ContextMenu.Item";
const N = React.forwardRef(({ className: t2, ...n2 }, o) => React.createElement(Group2, { ...n2, asChild: false, ref: o, className: y$1("rt-BaseMenuGroup", "rt-ContextMenuGroup", t2) }));
N.displayName = "ContextMenu.Group";
const T = React.forwardRef(({ className: t2, ...n2 }, o) => React.createElement(RadioGroup2, { ...n2, asChild: false, ref: o, className: y$1("rt-BaseMenuRadioGroup", "rt-ContextMenuRadioGroup", t2) }));
T.displayName = "ContextMenu.RadioGroup";
const E = React.forwardRef((t$1, n2) => {
  const { children: o, className: a2, color: u = p.color.default, ...i2 } = t$1;
  return React.createElement(RadioItem2, { ...i2, asChild: false, ref: n2, "data-accent-color": u, className: y$1("rt-BaseMenuItem", "rt-BaseMenuRadioItem", "rt-ContextMenuItem", "rt-ContextMenuRadioItem", a2) }, React.createElement(Slottable, null, o), React.createElement(ItemIndicator2, { className: "rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator" }, React.createElement(t, { className: "rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon" })));
});
E.displayName = "ContextMenu.RadioItem";
const G = React.forwardRef((t$1, n2) => {
  const { children: o, className: a2, shortcut: u, color: i$1 = i.color.default, ...C } = t$1;
  return React.createElement(CheckboxItem2, { ...C, asChild: false, ref: n2, "data-accent-color": i$1, className: y$1("rt-BaseMenuItem", "rt-BaseMenuCheckboxItem", "rt-ContextMenuItem", "rt-ContextMenuCheckboxItem", a2) }, React.createElement(Slottable, null, o), React.createElement(ItemIndicator2, { className: "rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator" }, React.createElement(t, { className: "rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon" })), u && React.createElement("div", { className: "rt-BaseMenuShortcut rt-ContextMenuShortcut" }, u));
});
G.displayName = "ContextMenu.CheckboxItem";
const w = (t2) => React.createElement(Sub2, { ...t2 });
w.displayName = "ContextMenu.Sub";
const B = React.forwardRef((t2, n2) => {
  const { className: o, children: a2, ...u } = t2;
  return React.createElement(SubTrigger2, { ...u, asChild: false, ref: n2, className: y$1("rt-BaseMenuItem", "rt-BaseMenuSubTrigger", "rt-ContextMenuItem", "rt-ContextMenuSubTrigger", o) }, a2, React.createElement("div", { className: "rt-BaseMenuShortcut rt-ContextMenuShortcut" }, React.createElement(l, { className: "rt-BaseMenuSubTriggerIcon rt-ContextMenuSubTriggerIcon" })));
});
B.displayName = "ContextMenu.SubTrigger";
const k = React.forwardRef((t2, n$1) => {
  const { size: o, variant: a2, color: u, highContrast: i2 } = React.useContext(g), { className: C, children: m, container: x, forceMount: M, ...l2 } = v$1({ size: o, variant: a2, color: u, highContrast: i2, ...t2 }, n);
  return React.createElement(Portal2, { container: x, forceMount: M }, React.createElement(R$1, { asChild: true }, React.createElement(SubContent2, { "data-accent-color": u, alignOffset: -Number(o) * 4, sideOffset: 1, collisionPadding: 10, ...l2, asChild: false, ref: n$1, className: y$1("rt-PopperContent", "rt-BaseMenuContent", "rt-BaseMenuSubContent", "rt-ContextMenuContent", "rt-ContextMenuSubContent", C) }, React.createElement(c, { type: "auto" }, React.createElement("div", { className: y$1("rt-BaseMenuViewport", "rt-ContextMenuViewport") }, m)))));
});
k.displayName = "ContextMenu.SubContent";
const W = React.forwardRef(({ className: t2, ...n2 }, o) => React.createElement(Separator2, { ...n2, asChild: false, ref: o, className: y$1("rt-BaseMenuSeparator", "rt-ContextMenuSeparator", t2) }));
W.displayName = "ContextMenu.Separator";
export {
  G as CheckboxItem,
  v as Content,
  N as Group,
  R as Item,
  y as Label,
  T as RadioGroup,
  E as RadioItem,
  h as Root,
  W as Separator,
  w as Sub,
  k as SubContent,
  B as SubTrigger,
  S as Trigger
};
//# sourceMappingURL=context-menu.js.map
