import { jsxs as i, jsx as d } from "react/jsx-runtime";
import { forwardRef as C } from "react";
import { cx as I } from "../../utils/classNames.js";
import { useArrowTheme as T } from "../../hooks/useArrowTheme.js";
const $ = C(
  (e, o) => {
    const {
      label: f,
      icon: b,
      radius: c = "none",
      inverse: N,
      className: p,
      variant: t
    } = e, x = T(), r = N ?? x.inverse, n = t === "interactive", v = n ? void 0 : e.type, y = n ? e.navigationType ?? "internal" : void 0, _ = n ? e.href : void 0, z = n ? e.focused : void 0, m = n ? e.onClick : void 0, l = n ? e.size : void 0, h = n ? e.chevronIcon : void 0, a = I(
      "tdds-promo-banner",
      {
        [`tdds-promo-banner--${v}`]: !!v,
        [`tdds-promo-banner--${c}`]: !!c,
        [`tdds-promo-banner--${t}`]: !!t,
        "force-focus": !!z
      },
      p
    ), s = /* @__PURE__ */ i("div", { className: "tdds-promo-banner__content", children: [
      b ?? null,
      /* @__PURE__ */ d("span", { className: "tdds-promo-banner__label", children: f })
    ] });
    if (n) {
      const u = h ? /* @__PURE__ */ d("span", { className: "tdds-promo-banner__chevron", "aria-hidden": "true", children: h }) : null;
      return y === "external" ? /* @__PURE__ */ i(
        "a",
        {
          ref: o,
          className: a,
          "data-inverse": r ? "true" : void 0,
          href: _ || void 0,
          "data-size": l || void 0,
          onClick: m,
          children: [
            s,
            u
          ]
        }
      ) : /* @__PURE__ */ i(
        "button",
        {
          ref: o,
          className: a,
          "data-inverse": r ? "true" : void 0,
          "data-size": l || void 0,
          type: "button",
          onClick: m,
          children: [
            s,
            u
          ]
        }
      );
    }
    return /* @__PURE__ */ d(
      "div",
      {
        ref: o,
        className: a,
        "data-inverse": r ? "true" : void 0,
        "data-size": "xs",
        children: s
      }
    );
  }
);
$.displayName = "PromoBanner";
export {
  $ as PromoBanner
};
//# sourceMappingURL=PromoBanner.js.map
