"use client";
import { jsxs as e, jsx as t } from "react/jsx-runtime";
import { u as x } from "./portal-provider-hwmkdmkpvct0cb76.js";
import { c as a } from "./vendor-styling-ofvnbcuht98q88oo.js";
import { $ as v, W as C, X as L, Y as w, Z as T, _ as b, bn as k } from "./vendor-base-ui-elpbzr8xeffrz4h2.js";
const Z = v;
function M({
  content: o,
  children: i,
  align: n,
  asChild: s,
  render: l,
  side: d,
  className: p,
  container: c,
  closeDelay: m,
  delay: u,
  ...f
}) {
  const h = x(), g = c ?? h ?? void 0, r = l ?? (s ? i : void 0);
  return /* @__PURE__ */ e(C, { ...f, children: [
    /* @__PURE__ */ t(
      L,
      {
        closeDelay: m,
        delay: u,
        className: a(
          // Defensive resets when rendering as button wrapper (not render/asChild)
          // These prevent global button styles from polluting the trigger
          // Consumer styles passed via className will override these.
          !(r !== void 0) && "inline-flex items-center bg-transparent border-none shadow-none p-0 m-0 h-auto min-h-0 leading-[0]",
          // Tooltip triggers are disclosure elements, not actions — override
          // cursor: pointer (e.g. from Button used via render prop) so the
          // trigger doesn't appear clickable
          "cursor-default",
          p
        ),
        render: r,
        children: s ? void 0 : i
      }
    ),
    /* @__PURE__ */ t(w, { container: g, children: /* @__PURE__ */ t(T, { align: n, side: d, sideOffset: 10, className: "max-w-[var(--available-width)]", children: /* @__PURE__ */ e(
      b,
      {
        className: a(
          "flex origin-[var(--transform-origin)] flex-col rounded-md bg-kumo-base px-2.5 py-1.5 text-sm text-kumo-default",
          "shadow-lg shadow-kumo-tip-shadow outline outline-kumo-fill",
          "transition-[transform,scale,opacity] duration-150",
          "data-[starting-style]:scale-90 data-[starting-style]:opacity-0",
          "data-[ending-style]:scale-90 data-[ending-style]:opacity-0",
          "data-[instant]:duration-0",
          "kumo-tooltip-popup"
        ),
        children: [
          /* @__PURE__ */ t(
            k,
            {
              className: a(
                "flex",
                "data-[side=bottom]:top-[-8px]",
                "data-[side=left]:right-[-13px] data-[side=left]:rotate-90",
                "data-[side=right]:left-[-13px] data-[side=right]:-rotate-90",
                "data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
              ),
              children: /* @__PURE__ */ t(y, {})
            }
          ),
          o
        ]
      }
    ) }) })
  ] });
}
function y(o) {
  return /* @__PURE__ */ e("svg", { width: "20", height: "10", viewBox: "0 0 20 10", fill: "none", ...o, children: [
    /* @__PURE__ */ t(
      "path",
      {
        d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
        className: "fill-kumo-base"
      }
    ),
    /* @__PURE__ */ t(
      "path",
      {
        d: "M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z",
        className: "fill-kumo-tip-shadow"
      }
    ),
    /* @__PURE__ */ t(
      "path",
      {
        d: "M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z",
        className: "fill-kumo-tip-stroke"
      }
    )
  ] });
}
export {
  M as T,
  Z as a
};
//# sourceMappingURL=tooltip-mooldq78tg77ekvv.js.map
