import { jsxs as r, jsx as e } from "react/jsx-runtime";
import b from "react";
import { TooltipProvider as h, Tooltip as x, TooltipTrigger as y, TooltipContent as j } from "./TooltipPrimitive.js";
import K from "../kbd/KbdGroup.js";
import $ from "../kbd/Kbd.js";
const k = ({
  content: a,
  shortcut: i,
  children: n,
  side: p = "top",
  align: d = "center",
  sideOffset: t = 4,
  hidden: m = !1,
  delayDuration: s = 0,
  open: f,
  "aria-keyshortcuts": c,
  ...T
}) => {
  const g = i != null && i.length ? /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-[var(--spacing-2)]", children: [
    /* @__PURE__ */ e("span", { children: a }),
    /* @__PURE__ */ e(K, { "aria-label": "Keyboard shortcut", children: i.map((o, l) => /* @__PURE__ */ r(b.Fragment, { children: [
      l > 0 && /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "+" }),
      /* @__PURE__ */ e($, { children: o })
    ] }, `${o}-${l}`)) })
  ] }) : a;
  return /* @__PURE__ */ e(h, { delayDuration: s, skipDelayDuration: 0, children: /* @__PURE__ */ r(x, { open: f, children: [
    /* @__PURE__ */ e(y, { "aria-keyshortcuts": (i == null ? void 0 : i.join("+")) ?? c, ...T, children: n }),
    /* @__PURE__ */ e(j, { side: p, align: d, sideOffset: t, hidden: m, children: g })
  ] }) });
};
k.displayName = "Tooltip";
export {
  k as default
};
//# sourceMappingURL=Tooltip.js.map
