import { jsx as e } from "react/jsx-runtime";
import { cloneElement as a } from "react";
import { LegacyTooltip as m } from "../LegacyTooltip/LegacyTooltip.es.js";
import l from "../../foundation/Icon/Generated/IconQuestionMarkCircle.es.js";
import { IconSize as s } from "../../foundation/Icon/IconSize.es.js";
import { FOCUS_VISIBLE_STYLE as w } from "../../utilities/focusStyle.es.js";
import { merge as v } from "../../utilities/merge.es.js";
var x = /* @__PURE__ */ ((t) => (t.Danger = "Danger", t.Warning = "Warning", t.Primary = "Primary", t))(x || {});
const g = {
  Danger: "tw-text-box-negative-inverse",
  Warning: "tw-text-box-warning-inverse",
  Primary: "tw-text-text-weak"
}, c = {
  Danger: "hover:tw-text-box-negative-inverse-hover hover:tw-bg-box-neutral",
  Warning: "hover:tw-text-box-warning-inverse-hover hover:tw-bg-box-neutral",
  Primary: "hover:tw-text-text hover:tw-bg-box-neutral"
}, u = ({
  tooltip: t,
  iconSize: n = s.Size16,
  triggerIcon: i = /* @__PURE__ */ e(l, {}),
  triggerStyle: r = "Primary",
  "data-test-id": o = "tooltip-icon"
}) => /* @__PURE__ */ e("div", { "data-test-id": o, children: t && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
  m,
  {
    triggerElement: /* @__PURE__ */ e(
      "button",
      {
        type: "button",
        "aria-label": "More info",
        "data-test-id": `${o}-trigger`,
        className: v([
          "tw-inline-flex tw-justify-center tw-items-center tw-cursor-default tw-outline-none tw-rounded-full",
          w,
          g[r],
          c[r]
        ]),
        children: a(i, { size: n })
      }
    ),
    withArrow: !0,
    ...t
  }
) }) });
u.displayName = "FondueTooltipIcon";
export {
  u as TooltipIcon,
  x as TooltipIconTriggerStyle
};
//# sourceMappingURL=TooltipIcon.es.js.map
