;
{
  try {
    let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
    n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a7f067c7-d7b1-4d87-9afe-1eae7441f5ea", e._sentryDebugIdIdentifier = "sentry-dbid-a7f067c7-d7b1-4d87-9afe-1eae7441f5ea");
  } catch (e) {
  }
}
;
import { jsxs, jsx } from "preact/jsx-runtime";
import cx from "classnames";
import { defineSlots } from "named-slots";
import { S as StackLayout } from "./unincorporated-partnership-MeN1dp53.js";
import { T as TaskVerificationStatus } from "./TaskVerificationStatus-C19Z4x3D.js";
const header = "adyen-kyc-header";
const headerMargin = "adyen-kyc-header-margin";
const headerMarginSecondary = "adyen-kyc-header-margin-secondary";
const headerLeft = "adyen-kyc-header-left";
const headerCenter = "adyen-kyc-header-center";
const headerRight = "adyen-kyc-header-right";
const headerContent = "adyen-kyc-header-content";
const headerActions = "adyen-kyc-header-actions";
const headerTitle = "adyen-kyc-header-title";
const headerTitlePrimary = "adyen-kyc-header-title-primary";
const headerTitleSecondary = "adyen-kyc-header-title-secondary";
const headerDescription = "adyen-kyc-header-description";
const headerDescriptionPrimary = "adyen-kyc-header-description-primary";
const headerDescriptionSecondary = "adyen-kyc-header-description-secondary";
const styles = {
  header,
  headerMargin,
  headerMarginSecondary,
  headerLeft,
  headerCenter,
  headerRight,
  headerContent,
  headerActions,
  headerTitle,
  headerTitlePrimary,
  headerTitleSecondary,
  headerDescription,
  headerDescriptionPrimary,
  headerDescriptionSecondary
};
const alignmentStyles = {
  left: styles.headerLeft,
  center: styles.headerCenter,
  right: styles.headerRight
};
const Header = ({
  align = "left",
  children,
  description,
  secondary = false,
  status,
  title
}) => {
  const { Slot, hasSlot } = defineSlots(children ?? [], ["actions", "description"]);
  const HeadingElement = secondary ? "h2" : "h1";
  const rootClassname = cx(styles.header, alignmentStyles[align], {
    [styles.headerMargin]: !secondary,
    [styles.headerMarginSecondary]: secondary
  });
  const titleClassname = cx(styles.headerTitle, {
    [styles.headerTitlePrimary]: !secondary,
    [styles.headerTitleSecondary]: secondary
  });
  const descriptionClassname = cx(styles.headerDescription, {
    [styles.headerDescriptionPrimary]: !secondary,
    [styles.headerDescriptionSecondary]: secondary
  });
  return /* @__PURE__ */ jsxs("header", { className: rootClassname, children: [
    status && /* @__PURE__ */ jsx(TaskVerificationStatus, { status, responsive: false }),
    /* @__PURE__ */ jsxs("div", { className: styles.headerContent, children: [
      /* @__PURE__ */ jsx(HeadingElement, { className: titleClassname, children: title }),
      (hasSlot("description") || description) && /* @__PURE__ */ jsx("div", { className: descriptionClassname, children: /* @__PURE__ */ jsx(Slot, { name: "description", children: description }) })
    ] }),
    hasSlot("actions") && /* @__PURE__ */ jsx("div", { className: styles.headerActions, children: /* @__PURE__ */ jsx(StackLayout, { gap: "small", horizontal: true, children: /* @__PURE__ */ jsx(Slot, { name: "actions" }) }) })
  ] });
};
export {
  Header as H
};
