"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, {
    Tooltip: function() {
        return Tooltip;
    },
    TooltipContent: function() {
        return TooltipContent;
    },
    TooltipProvider: function() {
        return TooltipProvider;
    },
    TooltipTrigger: function() {
        return TooltipTrigger;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
const _reacttooltip = /*#__PURE__*/ _interop_require_wildcard(require("@radix-ui/react-tooltip"));
const _css = require("../utils/css");
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 TooltipProvider = _reacttooltip.Provider;
// const Tooltip = TooltipPrimitive.Root;
const TooltipTrigger = _reacttooltip.Trigger;
const TooltipContent = /*#__PURE__*/ _react.forwardRef(({ className, sideOffset = 4, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reacttooltip.Content, {
        ref: ref,
        sideOffset: sideOffset,
        className: (0, _css.cn)("orderly-z-50 orderly-overflow-hidden orderly-rounded orderly-border orderly-bg-base-600 orderly-px-3 orderly-py-1.5 orderly-text-3xs orderly-text-popover-foreground orderly-shadow-md orderly-animate-in orderly-fade-in-0 orderly-zoom-in-95 data-[state=closed]:orderly-animate-out data-[state=closed]:orderly-fade-out-0 data-[state=closed]:orderly-zoom-out-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
    }));
TooltipContent.displayName = _reacttooltip.Content.displayName;
const Tooltip = ({ className, open, defaultOpen, onOpenChange, children, content, sideOffset = 4, ...props })=>{
    return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_reacttooltip.Root, {
        open: open,
        defaultOpen: defaultOpen,
        onOpenChange: onOpenChange,
        children: [
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_reacttooltip.Trigger, {
                asChild: true,
                children: children
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsxs)(_reacttooltip.Content, {
                side: "top",
                align: "center",
                sideOffset: sideOffset,
                className: (0, _css.cn)("orderly-z-50 orderly-overflow-hidden orderly-rounded orderly-bg-base-400 orderly-px-3 orderly-py-1.5 orderly-text-3xs orderly-text-base-contrast orderly-shadow-md orderly-animate-in orderly-fade-in-0 orderly-zoom-in-95 data-[state=closed]:orderly-animate-out data-[state=closed]:orderly-fade-out-0 data-[state=closed]:orderly-zoom-out-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: [
                    content,
                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_reacttooltip.Arrow, {
                        width: 11,
                        height: 5,
                        className: "orderly-fill-base-400"
                    })
                ]
            })
        ]
    });
};
Tooltip.displayName = _reacttooltip.Root.displayName;

//# sourceMappingURL=tooltip.js.map