import { jsx as o, jsxs as s } from "react/jsx-runtime";
import * as t from "@radix-ui/react-tooltip";
import { forwardRef as d } from "react";
import { zIndexLayers as a } from "../../helpers/zIndexLayers.es.js";
const c = t.Provider, m = t.Root, w = t.Trigger, x = t.Portal, T = t.Content;
function u(i) {
  const r = d(({ tooltip: e, ...l }, p) => {
    const n = /* @__PURE__ */ o(i, { ref: p, ...l });
    return e ? /* @__PURE__ */ o(c, { children: /* @__PURE__ */ s(m, { delayDuration: 300, children: [
      /* @__PURE__ */ o(w, { asChild: !0, children: n }),
      /* @__PURE__ */ o(x, { children: /* @__PURE__ */ o(
        T,
        {
          style: {
            zIndex: a.toolbarTooltip
          },
          className: "tw-bg-text tw-border tw-border-line-strong tw-text-box-neutral-strong-inverse tw-py-2 tw-px-3 tw-rounded tw-shadow-lg tw-text-xs",
          children: e
        }
      ) })
    ] }) }) : n;
  });
  return r.displayName = "WrappedComponent", r;
}
export {
  m as Tooltip,
  T as TooltipContent,
  x as TooltipPortal,
  c as TooltipProvider,
  w as TooltipTrigger,
  u as withTooltip
};
//# sourceMappingURL=Tooltip.es.js.map
