import { jsx as e, jsxs as n, Fragment as v } from "react/jsx-runtime";
import { forwardRef as x, createElement as j } from "react";
import { cx as c } from "../../utils/classNames.js";
import { useArrowTheme as w } from "../../hooks/useArrowTheme.js";
const H = x(
  ({
    id: o,
    headLine: s,
    subHeadline: r,
    heading: l = "h2",
    isAction: t = !1,
    actionHref: i = "#",
    trailingContent: a,
    focused: m = !1,
    inverse: h,
    className: f
  }, _) => {
    const p = w(), u = h ?? p.inverse;
    if (!s)
      return null;
    const d = /* @__PURE__ */ n(v, { children: [
      /* @__PURE__ */ e("span", { className: "tdds-section-header__text", children: s }),
      r ? /* @__PURE__ */ e("span", { className: "tdds-section-header__subHeadline", children: r }) : null
    ] }), N = j(
      l,
      { className: "tdds-section-header__title", id: o },
      t ? /* @__PURE__ */ e(
        "a",
        {
          className: c("tdds-section-header__title-link", {
            "force-focus": m
          }),
          href: i,
          children: d
        }
      ) : d
    );
    return /* @__PURE__ */ n(
      "div",
      {
        ref: _,
        className: c("tdds-section-header", f),
        ...u ? { "data-inverse": "true" } : {},
        children: [
          N,
          a && !t ? /* @__PURE__ */ e("div", { className: "tdds-section-header__controls", children: a }) : null
        ]
      }
    );
  }
);
H.displayName = "SectionHeader";
export {
  H as SectionHeader
};
//# sourceMappingURL=SectionHeader.js.map
