"use client";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
import { cn } from "@stigmer/theme";
import { CheckIcon } from "lucide-react";
// ---------------------------------------------------------------------------
// SDK-internal styled Menu primitives over @base-ui/react.
//
// These are NOT exported from @stigmer/react. They provide a single source
// of truth for dropdown menu styling across SDK styled components
// (OrgSwitcher, UserMenu, etc.) so that every menu looks identical.
//
// Portaled content uses popover-* / main-area tokens per DD-005.
// ---------------------------------------------------------------------------
function Menu(props) {
    return _jsx(MenuPrimitive.Root, { ...props });
}
function MenuTrigger(props) {
    return _jsx(MenuPrimitive.Trigger, { ...props });
}
function MenuContent({ align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, ...props }) {
    return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(MenuPrimitive.Popup, { className: cn("bg-popover text-popover-foreground ring-foreground/10", "data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", "data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100 outline-none data-closed:overflow-hidden", className), ...props }) }) }));
}
function MenuItem({ className, variant = "default", ...props }) {
    return (_jsx(MenuPrimitive.Item, { "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground", "data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive-subtle data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive", "relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none", "data-disabled:pointer-events-none data-disabled:opacity-50", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
}
function MenuRadioGroup(props) {
    return _jsx(MenuPrimitive.RadioGroup, { ...props });
}
function MenuRadioItem({ className, children, ...props }) {
    return (_jsxs(MenuPrimitive.RadioItem, { className: cn("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground", "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none", "data-disabled:pointer-events-none data-disabled:opacity-50", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
}
function MenuSeparator({ className, ...props }) {
    return (_jsx(MenuPrimitive.Separator, { className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
}
function MenuGroup({ className, ...props }) {
    return _jsx("div", { role: "group", className: className, ...props });
}
function MenuLabel({ className, ...props }) {
    return (_jsx("span", { className: cn("text-muted-foreground block px-1.5 py-1 text-[11px] font-medium uppercase tracking-wider select-none", className), ...props }));
}
export { Menu, MenuTrigger, MenuContent, MenuItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuGroup, MenuLabel, };
//# sourceMappingURL=menu.js.map