import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import * as React from "react";
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
import { cn } from "../utils/css";
import { ArrowIcon } from "../icon";
const DropdownMenu = DropdownMenuPrimitive.Root;
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
const DropdownMenuSubTrigger = /*#__PURE__*/ React.forwardRef(({ className, inset, children, ...props }, ref)=>/*#__PURE__*/ _jsxs(DropdownMenuPrimitive.SubTrigger, {
        ref: ref,
        className: cn("orderly-flex orderly-cursor-default orderly-select-none orderly-items-center orderly-rounded-sm orderly-px-2 orderly-py-1.5 orderly-text-3xs orderly-outline-none focus:orderly-bg-accent data-[state=open]:orderly-bg-accent", inset && "orderly-pl-8", className),
        ...props,
        children: [
            children,
            /*#__PURE__*/ _jsx(ArrowIcon, {
                size: 12
            })
        ]
    }));
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
const DropdownMenuSubContent = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(DropdownMenuPrimitive.SubContent, {
        ref: ref,
        className: cn("orderly-z-50 orderly-min-w-[8rem] orderly-overflow-hidden orderly-rounded orderly-border orderly-bg-base-600 orderly-p-1 orderly-text-popover-foreground orderly-shadow-lg data-[state=open]:orderly-animate-in data-[state=closed]:orderly-animate-out data-[state=closed]:orderly-fade-out-0 data-[state=open]:orderly-fade-in-0 data-[state=closed]:orderly-zoom-out-95 data-[state=open]:orderly-zoom-in-95 data-[side=bottom]:orderly-slide-in-from-top-2 data-[side=left]:orderly-slide-in-from-right-2 data-[side=right]:orderly-slide-in-from-left-2 data-[side=top]:orderly-slide-in-from-bottom-2", className),
        ...props
    }));
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
const DropdownMenuContent = /*#__PURE__*/ React.forwardRef(({ className, sideOffset = 4, container, ...props }, ref)=>/*#__PURE__*/ _jsx(DropdownMenuPrimitive.Portal, {
        container: container,
        children: /*#__PURE__*/ _jsx(DropdownMenuPrimitive.Content, {
            ref: ref,
            sideOffset: sideOffset,
            className: cn("orderly-z-50 orderly-min-w-[8rem] orderly-overflow-hidden orderly-rounded orderly-bg-base-600 orderly-p-1 orderly-text-popover-foreground orderly-shadow-md orderly-py-2", "data-[state=open]:orderly-animate-in data-[state=closed]:orderly-animate-out data-[state=closed]:orderly-fade-out-0 data-[state=open]:orderly-fade-in-0 data-[state=closed]:orderly-zoom-out-95 data-[state=open]:orderly-zoom-in-95 data-[side=bottom]:orderly-slide-in-from-top-2 data-[side=left]:orderly-slide-in-from-right-2 data-[side=right]:orderly-slide-in-from-left-2 data-[side=top]:orderly-slide-in-from-bottom-2", className),
            ...props
        })
    }));
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
const DropdownMenuItem = /*#__PURE__*/ React.forwardRef(({ className, inset, ...props }, ref)=>/*#__PURE__*/ _jsx(DropdownMenuPrimitive.Item, {
        ref: ref,
        className: cn("orderly-relative orderly-flex orderly-cursor-pointer orderly-select-none orderly-items-center orderly-rounded-sm orderly-px-2 orderly-py-2 orderly-text-3xs orderly-outline-none orderly-transition-colors focus:orderly-bg-base-700 data-[disabled]:orderly-pointer-events-none data-[disabled]:orderly-opacity-50 [data-highlighted]:orderly-bg-base-700", inset && "orderly-pl-8", className),
        ...props
    }));
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
const DropdownMenuCheckboxItem = /*#__PURE__*/ React.forwardRef(({ className, children, checked, ...props }, ref)=>/*#__PURE__*/ _jsxs(DropdownMenuPrimitive.CheckboxItem, {
        ref: ref,
        className: cn("orderly-relative orderly-flex orderly-cursor-default orderly-select-none orderly-items-center orderly-rounded-sm orderly-py-1.5 orderly-pl-8 orderly-pr-2 orderly-text-3xs orderly-outline-none orderly-transition-colors focus:orderly-bg-accent focus:orderly-text-accent-foreground data-[disabled]:orderly-pointer-events-none data-[disabled]:orderly-opacity-50", className),
        checked: checked,
        ...props,
        children: [
            /*#__PURE__*/ _jsx("span", {
                className: "orderly-absolute orderly-left-2 orderly-flex orderly-h-3.5 orderly-w-3.5 orderly-items-center orderly-justify-center",
                children: /*#__PURE__*/ _jsx(DropdownMenuPrimitive.ItemIndicator, {
                    children: /*#__PURE__*/ _jsx(ArrowIcon, {
                        size: 12
                    })
                })
            }),
            children
        ]
    }));
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
const DropdownMenuRadioItem = /*#__PURE__*/ React.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ _jsxs(DropdownMenuPrimitive.RadioItem, {
        ref: ref,
        className: cn("orderly-relative orderly-flex orderly-cursor-default orderly-select-none orderly-items-center orderly-rounded-sm orderly-py-1.5 orderly-pl-8 orderly-pr-2 orderly-text-3xs orderly-outline-none orderly-transition-colors focus:orderly-bg-accent focus:orderly-text-accent-foreground data-[disabled]:orderly-pointer-events-none data-[disabled]:orderly-opacity-50", className),
        ...props,
        children: [
            /*#__PURE__*/ _jsx("span", {
                className: "orderly-absolute orderly-left-2 orderly-flex orderly-h-3.5 orderly-w-3.5 orderly-items-center orderly-justify-center",
                children: /*#__PURE__*/ _jsx(DropdownMenuPrimitive.ItemIndicator, {
                    children: /*#__PURE__*/ _jsx(ArrowIcon, {
                        size: 12
                    })
                })
            }),
            children
        ]
    }));
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
const DropdownMenuLabel = /*#__PURE__*/ React.forwardRef(({ className, inset, ...props }, ref)=>/*#__PURE__*/ _jsx(DropdownMenuPrimitive.Label, {
        ref: ref,
        className: cn("orderly-px-2 orderly-py-1.5 orderly-text-3xs orderly-font-semibold", inset && "orderly-pl-8", className),
        ...props
    }));
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
const DropdownMenuSeparator = /*#__PURE__*/ React.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(DropdownMenuPrimitive.Separator, {
        ref: ref,
        className: cn("-orderly-mx-1 orderly-my-1 orderly-h-px orderly-bg-muted", className),
        ...props
    }));
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
const DropdownMenuShortcut = ({ className, ...props })=>{
    return /*#__PURE__*/ _jsx("span", {
        className: cn("orderly-ml-auto orderly-text-4xs orderly-tracking-widest orderly-opacity-60", className),
        ...props
    });
};
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup };

//# sourceMappingURL=dropdown.js.map