"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, {
    HoverCard: function() {
        return HoverCard;
    },
    HoverCardContent: function() {
        return HoverCardContent;
    },
    HoverCardRoot: function() {
        return HoverCardRoot;
    },
    HoverCardTrigger: function() {
        return HoverCardTrigger;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
const _reacthovercard = /*#__PURE__*/ _interop_require_wildcard(require("@radix-ui/react-hover-card"));
const _utils = require("../utils");
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 HoverCardRoot = _reacthovercard.Root;
const HoverCardTrigger = _reacthovercard.Trigger;
const HoverCardContent = /*#__PURE__*/ _react.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reacthovercard.Content, {
        ref: ref,
        align: align,
        sideOffset: sideOffset,
        className: (0, _utils.cn)("orderly-z-[100] orderly-w-64 orderly-rounded-md orderly-bg-base-400 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
    }));
HoverCardContent.displayName = _reacthovercard.Content.displayName;
const HoverCard = (props)=>{
    const { content, open, defaultOpen, onOpenChange, children, ...rest } = props;
    return /*#__PURE__*/ (0, _jsxruntime.jsxs)(HoverCardRoot, {
        open: open,
        defaultOpen: defaultOpen,
        onOpenChange: onOpenChange,
        children: [
            /*#__PURE__*/ (0, _jsxruntime.jsx)(HoverCardTrigger, {
                asChild: true,
                children: children
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_reacthovercard.Portal, {
                children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(HoverCardContent, {
                    ...rest,
                    children: [
                        content,
                        /*#__PURE__*/ (0, _jsxruntime.jsx)(_reacthovercard.Arrow, {
                            width: 11,
                            height: 5,
                            className: "orderly-fill-base-400"
                        })
                    ]
                })
            })
        ]
    });
};
HoverCard.displayName = "HoverCard";

//# sourceMappingURL=hoverCard.js.map