import { cn } from "./cva.js";
import * as React from "react";
import { jsx, jsxs } from "react/jsx-runtime";
import * as RMenu from "@radix-ui/react-dropdown-menu";
//#region src/DropdownMenu.tsx
const DropdownMenu = RMenu.Root;
const DropdownMenuTrigger = RMenu.Trigger;
const DropdownMenuGroup = RMenu.Group;
const DropdownMenuLabel = RMenu.Label;
const DropdownMenuSeparator = RMenu.Separator;
const DropdownMenuRadioGroup = RMenu.RadioGroup;
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(RMenu.Portal, { children: /* @__PURE__ */ jsx(RMenu.Content, {
	ref,
	sideOffset,
	className: cn("min-w-32 rounded-md border border-border bg-surface p-1 text-fg shadow-[var(--mod-shadow-md)]", className),
	...props
}) }));
DropdownMenuContent.displayName = "DropdownMenuContent";
const DropdownMenuItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RMenu.Item, {
	ref,
	className: cn("flex min-h-[var(--mod-touch-min)] cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm text-[var(--mod-color-accent-11)] outline-none focus:bg-[var(--mod-color-accent-4)] active:bg-[var(--mod-color-accent-5)] data-[disabled]:opacity-[var(--mod-opacity-disabled)]", className),
	...props
}));
DropdownMenuItem.displayName = "DropdownMenuItem";
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(RMenu.CheckboxItem, {
	ref,
	className: cn("relative flex min-h-[var(--mod-touch-min)] cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-[var(--mod-color-accent-11)] outline-none focus:bg-[var(--mod-color-accent-4)] active:bg-[var(--mod-color-accent-5)] data-[disabled]:opacity-[var(--mod-opacity-disabled)]", className),
	...props,
	children: [/* @__PURE__ */ jsx("span", {
		className: "absolute left-2 inline-flex items-center justify-center",
		children: /* @__PURE__ */ jsx(RMenu.ItemIndicator, {
			"aria-hidden": true,
			children: "✓"
		})
	}), children]
}));
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(RMenu.RadioItem, {
	ref,
	className: cn("relative flex min-h-[var(--mod-touch-min)] cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-[var(--mod-color-accent-11)] outline-none focus:bg-[var(--mod-color-accent-4)] active:bg-[var(--mod-color-accent-5)] data-[disabled]:opacity-[var(--mod-opacity-disabled)]", className),
	...props,
	children: [/* @__PURE__ */ jsx("span", {
		className: "absolute left-2 inline-flex items-center justify-center",
		children: /* @__PURE__ */ jsx(RMenu.ItemIndicator, {
			"aria-hidden": true,
			children: "•"
		})
	}), children]
}));
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
//#endregion
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger };
