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 { ThickCheckIcon as t, ThickChevronRightIcon as l } from "./icons.js";
import { ChevronDownIcon } 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, CheckboxItem as CheckboxItem2, ItemIndicator as ItemIndicator2, RadioGroup as RadioGroup2, RadioItem as RadioItem2, SubTrigger as SubTrigger2, SubContent as SubContent2 } from "../../../../../../../@radix-ui_react-dropdown-menu@2.1.16_@types_react-dom@19.1.9_@types_react@19.1.13__@typ_b3d21642eda90ae0b3d582e30ea516b9/node_modules/@radix-ui/react-dropdown-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 I = (e) => React.createElement(Root2, { ...e });
I.displayName = "DropdownMenu.Root";
const h = React.forwardRef(({ children: e, ...n2 }, r) => React.createElement(Trigger, { ...n2, ref: r, asChild: true }, a(e)));
h.displayName = "DropdownMenu.Trigger";
const b = React.createContext({}), g = React.forwardRef((e, n$1) => {
  const r = H(), { size: s = n.size.default, variant: p2 = n.variant.default, highContrast: u = n.highContrast.default } = e, { className: a2, children: m, color: M, container: w, forceMount: D, ...k } = v$1(e, n), l2 = M || r.accentColor;
  return React.createElement(Portal2, { container: w, forceMount: D }, React.createElement(R$1, { asChild: true }, React.createElement(Content2, { "data-accent-color": l2, align: "start", sideOffset: 4, collisionPadding: 10, ...k, asChild: false, ref: n$1, className: y$1("rt-PopperContent", "rt-BaseMenuContent", "rt-DropdownMenuContent", a2) }, React.createElement(c, { type: "auto" }, React.createElement("div", { className: y$1("rt-BaseMenuViewport", "rt-DropdownMenuViewport") }, React.createElement(b.Provider, { value: React.useMemo(() => ({ size: s, variant: p2, color: l2, highContrast: u }), [s, p2, l2, u]) }, m))))));
});
g.displayName = "DropdownMenu.Content";
const y = React.forwardRef(({ className: e, ...n2 }, r) => React.createElement(Label2, { ...n2, asChild: false, ref: r, className: y$1("rt-BaseMenuLabel", "rt-DropdownMenuLabel", e) }));
y.displayName = "DropdownMenu.Label";
const v = React.forwardRef((e, n2) => {
  const { className: r, children: s, color: p2 = a$1.color.default, shortcut: u, ...a2 } = e;
  return React.createElement(Item2, { "data-accent-color": p2, ...a2, ref: n2, className: y$1("rt-reset", "rt-BaseMenuItem", "rt-DropdownMenuItem", r) }, React.createElement(Slottable, null, s), u && React.createElement("div", { className: "rt-BaseMenuShortcut rt-DropdownMenuShortcut" }, u));
});
v.displayName = "DropdownMenu.Item";
const R = React.forwardRef(({ className: e, ...n2 }, r) => React.createElement(Group2, { ...n2, asChild: false, ref: r, className: y$1("rt-BaseMenuGroup", "rt-DropdownMenuGroup", e) }));
R.displayName = "DropdownMenu.Group";
const S = React.forwardRef(({ className: e, ...n2 }, r) => React.createElement(RadioGroup2, { ...n2, asChild: false, ref: r, className: y$1("rt-BaseMenuRadioGroup", "rt-DropdownMenuRadioGroup", e) }));
S.displayName = "DropdownMenu.RadioGroup";
const x = React.forwardRef((e, n2) => {
  const { children: r, className: s, color: p$1 = p.color.default, ...u } = e;
  return React.createElement(RadioItem2, { ...u, asChild: false, ref: n2, "data-accent-color": p$1, className: y$1("rt-BaseMenuItem", "rt-BaseMenuRadioItem", "rt-DropdownMenuItem", "rt-DropdownMenuRadioItem", s) }, r, React.createElement(ItemIndicator2, { className: "rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator" }, React.createElement(t, { className: "rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon" })));
});
x.displayName = "DropdownMenu.RadioItem";
const T = React.forwardRef((e, n2) => {
  const { children: r, className: s, shortcut: p2, color: u = i.color.default, ...a2 } = e;
  return React.createElement(CheckboxItem2, { ...a2, asChild: false, ref: n2, "data-accent-color": u, className: y$1("rt-BaseMenuItem", "rt-BaseMenuCheckboxItem", "rt-DropdownMenuItem", "rt-DropdownMenuCheckboxItem", s) }, r, React.createElement(ItemIndicator2, { className: "rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator" }, React.createElement(t, { className: "rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon" })), p2 && React.createElement("div", { className: "rt-BaseMenuShortcut rt-DropdownMenuShortcut" }, p2));
});
T.displayName = "DropdownMenu.CheckboxItem";
const E = React.forwardRef((e, n2) => {
  const { className: r, children: s, ...p2 } = e;
  return React.createElement(SubTrigger2, { ...p2, asChild: false, ref: n2, className: y$1("rt-BaseMenuItem", "rt-BaseMenuSubTrigger", "rt-DropdownMenuItem", "rt-DropdownMenuSubTrigger", r) }, s, React.createElement("div", { className: "rt-BaseMenuShortcut rt-DropdownMenuShortcut" }, React.createElement(l, { className: "rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon" })));
});
E.displayName = "DropdownMenu.SubTrigger";
const G = React.forwardRef((e, n$1) => {
  const { size: r, variant: s, color: p2, highContrast: u } = React.useContext(b), { className: a2, children: m, container: M, forceMount: w, ...D } = v$1({ size: r, variant: s, color: p2, highContrast: u, ...e }, n);
  return React.createElement(Portal2, { container: M, forceMount: w }, React.createElement(R$1, { asChild: true }, React.createElement(SubContent2, { "data-accent-color": p2, alignOffset: -Number(r) * 4, sideOffset: 1, collisionPadding: 10, ...D, asChild: false, ref: n$1, className: y$1("rt-PopperContent", "rt-BaseMenuContent", "rt-BaseMenuSubContent", "rt-DropdownMenuContent", "rt-DropdownMenuSubContent", a2) }, React.createElement(c, { type: "auto" }, React.createElement("div", { className: y$1("rt-BaseMenuViewport", "rt-DropdownMenuViewport") }, m)))));
});
G.displayName = "DropdownMenu.SubContent";
const B = React.forwardRef(({ className: e, ...n2 }, r) => React.createElement(Separator2, { ...n2, asChild: false, ref: r, className: y$1("rt-BaseMenuSeparator", "rt-DropdownMenuSeparator", e) }));
B.displayName = "DropdownMenu.Separator";
export {
  T as CheckboxItem,
  g as Content,
  R as Group,
  v as Item,
  y as Label,
  S as RadioGroup,
  x as RadioItem,
  I as Root,
  B as Separator,
  G as SubContent,
  E as SubTrigger,
  h as Trigger,
  ChevronDownIcon as TriggerIcon
};
//# sourceMappingURL=dropdown-menu.js.map
