"use client";
'use strict';

var tooltip = require('@base-ui/react/tooltip');
var classVarianceAuthority = require('class-variance-authority');
var clsx = require('clsx');
var tailwindMerge = require('tailwind-merge');
var jsxRuntime = require('react/jsx-runtime');

var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
function cn(...inputs) {
  return tailwindMerge.twMerge(clsx.clsx(inputs));
}
var tooltipContentVariants = classVarianceAuthority.cva(
  "z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-0.5 rounded-[6px] p-[8px] text-xs font-medium leading-5 has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
  {
    variants: {
      variant: {
        default: "bg-foreground text-background",
        black: "bg-foreground text-background",
        card: "bg-card text-card-foreground shadow-[0_1px_1px_-0.5px_rgba(0,0,0,0.04),0_3px_3px_-1.5px_rgba(0,0,0,0.04),0_6px_6px_-3px_rgba(0,0,0,0.04),0_12px_12px_-6px_rgba(0,0,0,0.04)] ring-1 ring-border",
        white: "bg-card text-card-foreground shadow-[0_1px_1px_-0.5px_rgba(0,0,0,0.04),0_3px_3px_-1.5px_rgba(0,0,0,0.04),0_6px_6px_-3px_rgba(0,0,0,0.04),0_12px_12px_-6px_rgba(0,0,0,0.04)] ring-1 ring-border"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
);
function TooltipProvider(_a) {
  var _b = _a, {
    delay = 0
  } = _b, props = __objRest(_b, [
    "delay"
  ]);
  return /* @__PURE__ */ jsxRuntime.jsx(
    tooltip.Tooltip.Provider,
    __spreadValues({
      "data-slot": "tooltip-provider",
      delay
    }, props)
  );
}
function Tooltip(_a) {
  var props = __objRest(_a, []);
  return /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Root, __spreadValues({ "data-slot": "tooltip" }, props));
}
function TooltipTrigger(_a) {
  var props = __objRest(_a, []);
  return /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
}
function TooltipContent(_a) {
  var _b = _a, {
    className,
    variant = "default",
    side = "top",
    sideOffset = 4,
    align = "center",
    alignOffset = 0,
    children
  } = _b, props = __objRest(_b, [
    "className",
    "variant",
    "side",
    "sideOffset",
    "align",
    "alignOffset",
    "children"
  ]);
  return /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
    tooltip.Tooltip.Positioner,
    {
      align,
      alignOffset,
      side,
      sideOffset,
      className: "isolate z-50",
      children: /* @__PURE__ */ jsxRuntime.jsxs(
        tooltip.Tooltip.Popup,
        __spreadProps(__spreadValues({
          "data-slot": "tooltip-content",
          className: cn(tooltipContentVariants({ variant, className }))
        }, props), {
          children: [
            children,
            /* @__PURE__ */ jsxRuntime.jsx(
              tooltip.Tooltip.Arrow,
              {
                className: cn(
                  "z-50 size-2.5 translate-y-[calc(-50%+1px)] rotate-45 rounded-[3px] data-[side=bottom]:top-1.5 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 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",
                  variant === "card" || variant === "white" ? "bg-card fill-card" : "bg-foreground fill-foreground"
                )
              }
            )
          ]
        })
      )
    }
  ) });
}

exports.Tooltip = Tooltip;
exports.TooltipContent = TooltipContent;
exports.TooltipProvider = TooltipProvider;
exports.TooltipTrigger = TooltipTrigger;
exports.tooltipContentVariants = tooltipContentVariants;
//# sourceMappingURL=tooltip.cjs.map
//# sourceMappingURL=tooltip.cjs.map