"use client";
"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, {
    Popover: function() {
        return Popover;
    },
    PopoverAnchor: function() {
        return PopoverAnchor;
    },
    PopoverArrow: function() {
        return PopoverArrow;
    },
    PopoverContent: function() {
        return PopoverContent;
    },
    PopoverTrigger: function() {
        return PopoverTrigger;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _reactpopover = /*#__PURE__*/ _interop_require_wildcard(require("@radix-ui/react-popover"));
const _css = require("../utils/css");
const _react = require("react");
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 Popover = _reactpopover.Root;
const PopoverTrigger = _reactpopover.Trigger;
const PopoverAnchor = _reactpopover.Anchor;
const PopoverArrow = _reactpopover.Arrow;
const PopoverContent = /*#__PURE__*/ (0, _react.forwardRef)(({ className, align = "center", sideOffset = 4, children, arrow, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reactpopover.Portal, {
        children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_reactpopover.Content, {
            ref: ref,
            align: align,
            sideOffset: sideOffset,
            className: (0, _css.cn)("orderly-z-50 orderly-w-72 orderly-rounded orderly-bg-base-800 orderly-p-4 orderly-text-base-contrast orderly-shadow-md orderly-outline-none 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,
            children: [
                children,
                arrow ? /*#__PURE__*/ (0, _jsxruntime.jsx)(PopoverArrow, {
                    className: "orderly-fill-inherit"
                }) : null
            ]
        })
    }));
PopoverContent.displayName = _reactpopover.Content.displayName;

//# sourceMappingURL=index.js.map