import * as e from "react";
import s from "../../../../../../../../../_virtual/index9.js";
import { Root as b, Trigger as E, Portal as M, Content as R, Group as S, Label as B, Item as v, Separator as y, CheckboxItem as T, ItemIndicator as I, RadioGroup as x, RadioItem as G, SubTrigger as P, SubContent as k } from "../../../../../../../@radix-ui_react-dropdown-menu@2.1.1_@types_react-dom@18.3.6_@types_react@18.3.3__@types_e364fd8f696a338bd2d80abd46c706df/node_modules/@radix-ui/react-dropdown-menu/dist/index.js";
import { Slottable as L } 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 $, baseMenuCheckboxItemPropDefs as z, baseMenuRadioItemPropDefs as V } from "./base-menu.props.js";
import { useThemeContext as O, Theme as w } from "./theme.js";
import { ThickCheckIcon as C, ThickChevronRightIcon as q } from "./icons.js";
import { ChevronDownIcon as ie } from "./icons.js";
import { extractProps as N } from "../helpers/extract-props.js";
import { requireReactElement as A } from "../helpers/require-react-element.js";
const H = (t) => e.createElement(b, { ...t });
H.displayName = "DropdownMenu.Root";
const j = e.forwardRef(({ children: t, ...a }, r) => e.createElement(E, { ...a, ref: r, asChild: !0 }, A(t)));
j.displayName = "DropdownMenu.Trigger";
const D = e.createContext({}), F = e.forwardRef((t, a) => {
  const r = O(), { size: n = m.size.default, variant: o = m.variant.default, highContrast: c = m.highContrast.default } = t, { className: l, children: u, color: i, container: d, forceMount: p, ...g } = N(t, m), f = i || r.accentColor;
  return e.createElement(M, { container: d, forceMount: p }, e.createElement(w, { asChild: !0 }, e.createElement(R, { "data-accent-color": f, align: "start", sideOffset: 4, collisionPadding: 10, ...g, asChild: !1, ref: a, className: s("rt-PopperContent", "rt-BaseMenuContent", "rt-DropdownMenuContent", l) }, e.createElement(h, { type: "auto" }, e.createElement("div", { className: s("rt-BaseMenuViewport", "rt-DropdownMenuViewport") }, e.createElement(D.Provider, { value: e.useMemo(() => ({ size: n, variant: o, color: f, highContrast: c }), [n, o, f, c]) }, u))))));
});
F.displayName = "DropdownMenu.Content";
const J = e.forwardRef(({ className: t, ...a }, r) => e.createElement(B, { ...a, asChild: !1, ref: r, className: s("rt-BaseMenuLabel", "rt-DropdownMenuLabel", t) }));
J.displayName = "DropdownMenu.Label";
const K = e.forwardRef((t, a) => {
  const { className: r, children: n, color: o = $.color.default, shortcut: c, ...l } = t;
  return e.createElement(v, { "data-accent-color": o, ...l, ref: a, className: s("rt-reset", "rt-BaseMenuItem", "rt-DropdownMenuItem", r) }, e.createElement(L, null, n), c && e.createElement("div", { className: "rt-BaseMenuShortcut rt-DropdownMenuShortcut" }, c));
});
K.displayName = "DropdownMenu.Item";
const Q = e.forwardRef(({ className: t, ...a }, r) => e.createElement(S, { ...a, asChild: !1, ref: r, className: s("rt-BaseMenuGroup", "rt-DropdownMenuGroup", t) }));
Q.displayName = "DropdownMenu.Group";
const U = e.forwardRef(({ className: t, ...a }, r) => e.createElement(x, { ...a, asChild: !1, ref: r, className: s("rt-BaseMenuRadioGroup", "rt-DropdownMenuRadioGroup", t) }));
U.displayName = "DropdownMenu.RadioGroup";
const W = e.forwardRef((t, a) => {
  const { children: r, className: n, color: o = V.color.default, ...c } = t;
  return e.createElement(G, { ...c, asChild: !1, ref: a, "data-accent-color": o, className: s("rt-BaseMenuItem", "rt-BaseMenuRadioItem", "rt-DropdownMenuItem", "rt-DropdownMenuRadioItem", n) }, r, e.createElement(I, { className: "rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator" }, e.createElement(C, { className: "rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon" })));
});
W.displayName = "DropdownMenu.RadioItem";
const X = e.forwardRef((t, a) => {
  const { children: r, className: n, shortcut: o, color: c = z.color.default, ...l } = t;
  return e.createElement(T, { ...l, asChild: !1, ref: a, "data-accent-color": c, className: s("rt-BaseMenuItem", "rt-BaseMenuCheckboxItem", "rt-DropdownMenuItem", "rt-DropdownMenuCheckboxItem", n) }, r, e.createElement(I, { className: "rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator" }, e.createElement(C, { className: "rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon" })), o && e.createElement("div", { className: "rt-BaseMenuShortcut rt-DropdownMenuShortcut" }, o));
});
X.displayName = "DropdownMenu.CheckboxItem";
const Y = e.forwardRef((t, a) => {
  const { className: r, children: n, ...o } = t;
  return e.createElement(P, { ...o, asChild: !1, ref: a, className: s("rt-BaseMenuItem", "rt-BaseMenuSubTrigger", "rt-DropdownMenuItem", "rt-DropdownMenuSubTrigger", r) }, n, e.createElement("div", { className: "rt-BaseMenuShortcut rt-DropdownMenuShortcut" }, e.createElement(q, { className: "rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon" })));
});
Y.displayName = "DropdownMenu.SubTrigger";
const Z = e.forwardRef((t, a) => {
  const { size: r, variant: n, color: o, highContrast: c } = e.useContext(D), { className: l, children: u, container: i, forceMount: d, ...p } = N({ size: r, variant: n, color: o, highContrast: c, ...t }, m);
  return e.createElement(M, { container: i, forceMount: d }, e.createElement(w, { asChild: !0 }, e.createElement(k, { "data-accent-color": o, alignOffset: -Number(r) * 4, sideOffset: 1, collisionPadding: 10, ...p, asChild: !1, ref: a, className: s("rt-PopperContent", "rt-BaseMenuContent", "rt-BaseMenuSubContent", "rt-DropdownMenuContent", "rt-DropdownMenuSubContent", l) }, e.createElement(h, { type: "auto" }, e.createElement("div", { className: s("rt-BaseMenuViewport", "rt-DropdownMenuViewport") }, u)))));
});
Z.displayName = "DropdownMenu.SubContent";
const _ = e.forwardRef(({ className: t, ...a }, r) => e.createElement(y, { ...a, asChild: !1, ref: r, className: s("rt-BaseMenuSeparator", "rt-DropdownMenuSeparator", t) }));
_.displayName = "DropdownMenu.Separator";
export {
  X as CheckboxItem,
  F as Content,
  Q as Group,
  K as Item,
  J as Label,
  U as RadioGroup,
  W as RadioItem,
  H as Root,
  _ as Separator,
  Z as SubContent,
  Y as SubTrigger,
  j as Trigger,
  ie as TriggerIcon
};
//# sourceMappingURL=dropdown-menu.js.map
