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