import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import * as React from "react";
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
import { cn } from "../utils/css";
const TooltipProvider = TooltipPrimitive.Provider;
// const Tooltip = TooltipPrimitive.Root;
const TooltipTrigger = TooltipPrimitive.Trigger;
const TooltipContent = /*#__PURE__*/ React.forwardRef(({ className, sideOffset = 4, ...props }, ref)=>/*#__PURE__*/ _jsx(TooltipPrimitive.Content, {
        ref: ref,
        sideOffset: sideOffset,
        className: 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 = TooltipPrimitive.Content.displayName;
const Tooltip = ({ className, open, defaultOpen, onOpenChange, children, content, sideOffset = 4, ...props })=>{
    return /*#__PURE__*/ _jsxs(TooltipPrimitive.Root, {
        open: open,
        defaultOpen: defaultOpen,
        onOpenChange: onOpenChange,
        children: [
            /*#__PURE__*/ _jsx(TooltipPrimitive.Trigger, {
                asChild: true,
                children: children
            }),
            /*#__PURE__*/ _jsxs(TooltipPrimitive.Content, {
                side: "top",
                align: "center",
                sideOffset: sideOffset,
                className: 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__*/ _jsx(TooltipPrimitive.Arrow, {
                        width: 11,
                        height: 5,
                        className: "orderly-fill-base-400"
                    })
                ]
            })
        ]
    });
};
Tooltip.displayName = TooltipPrimitive.Root.displayName;
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };

//# sourceMappingURL=tooltip.js.map