"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { cn } from "../../lib/utils.js";
import { TooltipRoot } from "../../node_modules/@base-ui/react/esm/tooltip/root/TooltipRoot.js";
import { TooltipTrigger as TooltipTrigger$1 } from "../../node_modules/@base-ui/react/esm/tooltip/trigger/TooltipTrigger.js";
import { TooltipPortal } from "../../node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortal.js";
import { TooltipPositioner } from "../../node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositioner.js";
import { TooltipPopup } from "../../node_modules/@base-ui/react/esm/tooltip/popup/TooltipPopup.js";
import { TooltipArrow } from "../../node_modules/@base-ui/react/esm/tooltip/arrow/TooltipArrow.js";
import { TooltipProvider as TooltipProvider$1 } from "../../node_modules/@base-ui/react/esm/tooltip/provider/TooltipProvider.js";
function TooltipProvider({ delay = 0, ...props }) {
  return /* @__PURE__ */ jsx(
    TooltipProvider$1,
    {
      "data-slot": "tooltip-provider",
      delay,
      ...props
    }
  );
}
function Tooltip({ ...props }) {
  return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipRoot, { "data-slot": "tooltip", ...props }) });
}
function TooltipTrigger({ ...props }) {
  return /* @__PURE__ */ jsx(TooltipTrigger$1, { "data-slot": "tooltip-trigger", ...props });
}
function TooltipContent({
  className,
  side = "top",
  sideOffset = 4,
  align = "center",
  alignOffset = 0,
  children,
  ...props
}) {
  return /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsx(
    TooltipPositioner,
    {
      align,
      alignOffset,
      side,
      sideOffset,
      className: "isolate z-50",
      children: /* @__PURE__ */ jsxs(
        TooltipPopup,
        {
          "data-slot": "tooltip-content",
          className: cn(
            "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-md px-3 py-1.5 text-xs bg-foreground text-background z-50 w-fit max-w-xs origin-(--transform-origin)",
            className
          ),
          ...props,
          children: [
            children,
            /* @__PURE__ */ jsx(TooltipArrow, { className: "size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
          ]
        }
      )
    }
  ) });
}
export {
  Tooltip,
  TooltipContent,
  TooltipProvider,
  TooltipTrigger
};
//# sourceMappingURL=tooltip.js.map
