import { jsx as t } 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 { FOCUS_VISIBLE_STYLE as g } from "../../utilities/focusStyle.es.js";
import { merge as m } from "../../utilities/merge.es.js";
var s = /* @__PURE__ */ ((e) => (e.Danger = "Danger", e.Warning = "Warning", e.Primary = "Primary", e))(s || {});
const l = {
  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"
}, b = {
  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"
}, h = ({
  tooltip: e,
  iconSize: o = v.Size16,
  triggerIcon: i = /* @__PURE__ */ t(x, {}),
  triggerStyle: r = "Primary",
  "data-test-id": n = "tooltip-icon"
}) => /* @__PURE__ */ t("div", { "data-test-id": n, children: e && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
  w,
  {
    triggerElement: /* @__PURE__ */ t(
      "button",
      {
        type: "button",
        "aria-label": "More info",
        "data-test-id": `${n}-trigger`,
        className: m([
          "tw-inline-flex tw-justify-center tw-items-center tw-cursor-default tw-outline-none tw-rounded-full",
          g,
          l[r],
          b[r]
        ]),
        children: a(i, { size: o })
      }
    ),
    withArrow: !0,
    ...e
  }
) }) });
h.displayName = "FondueTooltipIcon";
export {
  h as TooltipIcon,
  s as TooltipIconTriggerStyle
};
//# sourceMappingURL=TooltipIcon.es.js.map
