import { j as t } from "../../../_virtual/jsx-runtime.js";
import m from "../../../icons/Close.js";
import { StyledModalHeader as l, ModalTitle as u } from "../styles.js";
import { IconButton as x } from "../../IconButton/index.js";
function p({
  className: r,
  children: s,
  onClose: n,
  hideCloseIcon: i,
  mode: c,
  variant: a,
  ...e
}) {
  const o = e["data-testid"], d = e["data-trackid"];
  return /* @__PURE__ */ t.jsxs(
    l,
    {
      className: r,
      "data-testid": o || void 0,
      "data-trackingid": d || void 0,
      variant: a,
      children: [
        /* @__PURE__ */ t.jsx(u, { mode: c, hideCloseIcon: i, variant: a, children: s }),
        !i && /* @__PURE__ */ t.jsx(
          x,
          {
            variant: "ghost",
            size: "medium",
            icon: /* @__PURE__ */ t.jsx(m, {}),
            onClick: n,
            "data-testid": o ? `${o}-close-button` : void 0,
            "data-trackingid": d ? `${d}-close-button` : void 0
          }
        )
      ]
    }
  );
}
export {
  p as ModalHeader
};
