"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: all[name]
    });
}
_export(exports, {
    DropdownMenu: function() {
        return DropdownMenu;
    },
    DropdownMenuCheckboxItem: function() {
        return DropdownMenuCheckboxItem;
    },
    DropdownMenuContent: function() {
        return DropdownMenuContent;
    },
    DropdownMenuGroup: function() {
        return DropdownMenuGroup;
    },
    DropdownMenuItem: function() {
        return DropdownMenuItem;
    },
    DropdownMenuLabel: function() {
        return DropdownMenuLabel;
    },
    DropdownMenuPortal: function() {
        return DropdownMenuPortal;
    },
    DropdownMenuRadioGroup: function() {
        return DropdownMenuRadioGroup;
    },
    DropdownMenuRadioItem: function() {
        return DropdownMenuRadioItem;
    },
    DropdownMenuSeparator: function() {
        return DropdownMenuSeparator;
    },
    DropdownMenuShortcut: function() {
        return DropdownMenuShortcut;
    },
    DropdownMenuSub: function() {
        return DropdownMenuSub;
    },
    DropdownMenuSubContent: function() {
        return DropdownMenuSubContent;
    },
    DropdownMenuSubTrigger: function() {
        return DropdownMenuSubTrigger;
    },
    DropdownMenuTrigger: function() {
        return DropdownMenuTrigger;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
const _reactdropdownmenu = /*#__PURE__*/ _interop_require_wildcard(require("@radix-ui/react-dropdown-menu"));
const _css = require("../utils/css");
const _icon = require("../icon");
function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = new WeakMap();
    var cacheNodeInterop = new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop) {
        return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
    if (!nodeInterop && obj && obj.__esModule) {
        return obj;
    }
    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
        return {
            default: obj
        };
    }
    var cache = _getRequireWildcardCache(nodeInterop);
    if (cache && cache.has(obj)) {
        return cache.get(obj);
    }
    var newObj = {
        __proto__: null
    };
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for(var key in obj){
        if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
            var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
            if (desc && (desc.get || desc.set)) {
                Object.defineProperty(newObj, key, desc);
            } else {
                newObj[key] = obj[key];
            }
        }
    }
    newObj.default = obj;
    if (cache) {
        cache.set(obj, newObj);
    }
    return newObj;
}
const DropdownMenu = _reactdropdownmenu.Root;
const DropdownMenuTrigger = _reactdropdownmenu.Trigger;
const DropdownMenuGroup = _reactdropdownmenu.Group;
const DropdownMenuPortal = _reactdropdownmenu.Portal;
const DropdownMenuSub = _reactdropdownmenu.Sub;
const DropdownMenuRadioGroup = _reactdropdownmenu.RadioGroup;
const DropdownMenuSubTrigger = /*#__PURE__*/ _react.forwardRef(({ className, inset, children, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_reactdropdownmenu.SubTrigger, {
        ref: ref,
        className: (0, _css.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__*/ (0, _jsxruntime.jsx)(_icon.ArrowIcon, {
                size: 12
            })
        ]
    }));
DropdownMenuSubTrigger.displayName = _reactdropdownmenu.SubTrigger.displayName;
const DropdownMenuSubContent = /*#__PURE__*/ _react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reactdropdownmenu.SubContent, {
        ref: ref,
        className: (0, _css.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 = _reactdropdownmenu.SubContent.displayName;
const DropdownMenuContent = /*#__PURE__*/ _react.forwardRef(({ className, sideOffset = 4, container, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reactdropdownmenu.Portal, {
        container: container,
        children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactdropdownmenu.Content, {
            ref: ref,
            sideOffset: sideOffset,
            className: (0, _css.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 = _reactdropdownmenu.Content.displayName;
const DropdownMenuItem = /*#__PURE__*/ _react.forwardRef(({ className, inset, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reactdropdownmenu.Item, {
        ref: ref,
        className: (0, _css.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 = _reactdropdownmenu.Item.displayName;
const DropdownMenuCheckboxItem = /*#__PURE__*/ _react.forwardRef(({ className, children, checked, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_reactdropdownmenu.CheckboxItem, {
        ref: ref,
        className: (0, _css.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__*/ (0, _jsxruntime.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__*/ (0, _jsxruntime.jsx)(_reactdropdownmenu.ItemIndicator, {
                    children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_icon.ArrowIcon, {
                        size: 12
                    })
                })
            }),
            children
        ]
    }));
DropdownMenuCheckboxItem.displayName = _reactdropdownmenu.CheckboxItem.displayName;
const DropdownMenuRadioItem = /*#__PURE__*/ _react.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_reactdropdownmenu.RadioItem, {
        ref: ref,
        className: (0, _css.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__*/ (0, _jsxruntime.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__*/ (0, _jsxruntime.jsx)(_reactdropdownmenu.ItemIndicator, {
                    children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_icon.ArrowIcon, {
                        size: 12
                    })
                })
            }),
            children
        ]
    }));
DropdownMenuRadioItem.displayName = _reactdropdownmenu.RadioItem.displayName;
const DropdownMenuLabel = /*#__PURE__*/ _react.forwardRef(({ className, inset, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reactdropdownmenu.Label, {
        ref: ref,
        className: (0, _css.cn)("orderly-px-2 orderly-py-1.5 orderly-text-3xs orderly-font-semibold", inset && "orderly-pl-8", className),
        ...props
    }));
DropdownMenuLabel.displayName = _reactdropdownmenu.Label.displayName;
const DropdownMenuSeparator = /*#__PURE__*/ _react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reactdropdownmenu.Separator, {
        ref: ref,
        className: (0, _css.cn)("-orderly-mx-1 orderly-my-1 orderly-h-px orderly-bg-muted", className),
        ...props
    }));
DropdownMenuSeparator.displayName = _reactdropdownmenu.Separator.displayName;
const DropdownMenuShortcut = ({ className, ...props })=>{
    return /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
        className: (0, _css.cn)("orderly-ml-auto orderly-text-4xs orderly-tracking-widest orderly-opacity-60", className),
        ...props
    });
};
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";

//# sourceMappingURL=dropdown.js.map