import { jsx, jsxs } from "react/jsx-runtime";
import "react";
import { cn } from "../../lib/utils.js";
import { menuItemVariants } from "../../lib/variants.js";
import { DropdownMenuPortal, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuSeparator, DropdownMenuLabel, DropdownMenuShortcut, DropdownMenuRadioGroup, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent } from "./dropdown-menu.js";
import { Menubar as Menubar$1 } from "../../node_modules/@base-ui/react/esm/menubar/Menubar.js";
import Check from "../../node_modules/lucide-react/dist/esm/icons/check.js";
import { MenuItem } from "../../node_modules/@base-ui/react/esm/menu/item/MenuItem.js";
import { MenuCheckboxItem } from "../../node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItem.js";
import { MenuCheckboxItemIndicator } from "../../node_modules/@base-ui/react/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js";
import { MenuRadioItem } from "../../node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItem.js";
import { MenuRadioItemIndicator } from "../../node_modules/@base-ui/react/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js";
function Menubar({ className, ...props }) {
  return /* @__PURE__ */ jsx(
    Menubar$1,
    {
      "data-slot": "menubar",
      className: cn(
        "bg-background h-9 gap-1 rounded-md border p-1 shadow-xs flex items-center",
        className
      ),
      ...props
    }
  );
}
function MenubarMenu({ ...props }) {
  return /* @__PURE__ */ jsx(DropdownMenu, { "data-slot": "menubar-menu", ...props });
}
function MenubarGroup({ ...props }) {
  return /* @__PURE__ */ jsx(DropdownMenuGroup, { "data-slot": "menubar-group", ...props });
}
function MenubarPortal({ ...props }) {
  return /* @__PURE__ */ jsx(DropdownMenuPortal, { "data-slot": "menubar-portal", ...props });
}
function MenubarTrigger({ className, ...props }) {
  return /* @__PURE__ */ jsx(
    DropdownMenuTrigger,
    {
      "data-slot": "menubar-trigger",
      className: cn(
        "hover:bg-muted aria-expanded:bg-muted rounded-sm px-2 py-1 text-sm font-medium flex items-center outline-hidden select-none",
        className
      ),
      ...props
    }
  );
}
function MenubarContent({
  className,
  align = "start",
  alignOffset = -4,
  sideOffset = 8,
  ...props
}) {
  return /* @__PURE__ */ jsx(
    DropdownMenuContent,
    {
      "data-slot": "menubar-content",
      align,
      alignOffset,
      sideOffset,
      className: cn(
        "bg-popover text-popover-foreground data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 ring-foreground/10 min-w-36 rounded-md p-1 shadow-md ring-1 duration-100",
        className
      ),
      ...props
    }
  );
}
function MenubarItem({
  className,
  inset = false,
  variant = "default",
  ...props
}) {
  return /* @__PURE__ */ jsx(
    MenuItem,
    {
      "data-slot": "menubar-item",
      className: cn(
        menuItemVariants({ variant, inset }),
        "group/menubar-item",
        className
      ),
      ...props
    }
  );
}
function MenubarCheckboxItem({
  className,
  children,
  checked,
  ...props
}) {
  return /* @__PURE__ */ jsxs(
    MenuCheckboxItem,
    {
      "data-slot": "menubar-checkbox-item",
      className: cn(
        "focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm data-disabled:opacity-50 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
        className
      ),
      checked,
      ...props,
      children: [
        /* @__PURE__ */ jsx("span", { className: "left-2 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center", children: /* @__PURE__ */ jsx(MenuCheckboxItemIndicator, { children: /* @__PURE__ */ jsx(Check, {}) }) }),
        children
      ]
    }
  );
}
function MenubarRadioGroup({ ...props }) {
  return /* @__PURE__ */ jsx(DropdownMenuRadioGroup, { "data-slot": "menubar-radio-group", ...props });
}
function MenubarRadioItem({
  className,
  children,
  ...props
}) {
  return /* @__PURE__ */ jsxs(
    MenuRadioItem,
    {
      "data-slot": "menubar-radio-item",
      className: cn(
        "focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
        className
      ),
      ...props,
      children: [
        /* @__PURE__ */ jsx("span", { className: "left-2 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center", children: /* @__PURE__ */ jsx(MenuRadioItemIndicator, { children: /* @__PURE__ */ jsx(Check, {}) }) }),
        children
      ]
    }
  );
}
function MenubarLabel({ className, inset, ...props }) {
  return /* @__PURE__ */ jsx(
    DropdownMenuLabel,
    {
      "data-slot": "menubar-label",
      "data-inset": inset,
      className: cn(
        "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
        className
      ),
      ...props
    }
  );
}
function MenubarSeparator({ className, ...props }) {
  return /* @__PURE__ */ jsx(
    DropdownMenuSeparator,
    {
      "data-slot": "menubar-separator",
      className: cn("bg-border -mx-1 my-1 h-px", className),
      ...props
    }
  );
}
function MenubarShortcut({ className, ...props }) {
  return /* @__PURE__ */ jsx(
    DropdownMenuShortcut,
    {
      "data-slot": "menubar-shortcut",
      className: cn(
        "text-muted-foreground group-focus/menubar-item:text-accent-foreground text-xs tracking-widest ml-auto",
        className
      ),
      ...props
    }
  );
}
function MenubarSub({ ...props }) {
  return /* @__PURE__ */ jsx(DropdownMenuSub, { "data-slot": "menubar-sub", ...props });
}
function MenubarSubTrigger({
  className,
  inset,
  ...props
}) {
  return /* @__PURE__ */ jsx(
    DropdownMenuSubTrigger,
    {
      "data-slot": "menubar-sub-trigger",
      "data-inset": inset,
      className: cn(
        "focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm data-[inset]:pl-8 [&_svg:not([class*='size-'])]:size-4",
        className
      ),
      ...props
    }
  );
}
function MenubarSubContent({ className, ...props }) {
  return /* @__PURE__ */ jsx(
    DropdownMenuSubContent,
    {
      "data-slot": "menubar-sub-content",
      className: cn(
        "bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 ring-foreground/10 min-w-32 rounded-md p-1 shadow-lg ring-1 duration-100",
        className
      ),
      ...props
    }
  );
}
export {
  Menubar,
  MenubarCheckboxItem,
  MenubarContent,
  MenubarGroup,
  MenubarItem,
  MenubarLabel,
  MenubarMenu,
  MenubarPortal,
  MenubarRadioGroup,
  MenubarRadioItem,
  MenubarSeparator,
  MenubarShortcut,
  MenubarSub,
  MenubarSubContent,
  MenubarSubTrigger,
  MenubarTrigger
};
//# sourceMappingURL=menubar.js.map
