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] = "d6237487-0b5d-4da9-8d9c-f05660dc0cc0", e._sentryDebugIdIdentifier = "sentry-dbid-d6237487-0b5d-4da9-8d9c-f05660dc0cc0");
} catch (e) {}
import { i as Typography, r as useTranslation } from "./translation-DYpZlvOH.js";
import { n as IconButton } from "./Button-DOLNhJTG.js";
import { t as StackLayout } from "./StackLayout-D0Kqs-Ti.js";
import { t as Header } from "./Header-Drk8jcMl.js";
import { t as useAnalyticsContext } from "./useAnalyticsContext-Msf0gvuf.js";
import { t as List } from "./List-CV1oIvRM.js";
import { t as StructuredList } from "./StructuredList-UlwDK_PO.js";
import { t as trackNavigation } from "./trackNavigation--j_v51FT.js";
import { jsx, jsxs } from "preact/jsx-runtime";
import { defineSlots } from "named-slots";
var SummarySection_module_default = {
	"summary-header": "adyen-kyc-summary-header",
	summaryHeader: "adyen-kyc-summary-header"
};
//#endregion
//#region src/components/Shared/SummarySection/SummarySection.tsx
var SummarySection = ({ formId, label, items, action }) => /* @__PURE__ */ jsxs(List, {
	variant: "grouped-secondary",
	children: [/* @__PURE__ */ jsxs("header", {
		className: SummarySection_module_default.summaryHeader,
		children: [/* @__PURE__ */ jsx(Typography, {
			el: "h2",
			variant: "title",
			children: label
		}), action]
	}), /* @__PURE__ */ jsx(StructuredList, { items: items ?? [] })]
}, formId);
//#endregion
//#region src/components/Shared/NewSummary/NewSummary.tsx
var NewSummary = ({ children, handleEditForm, sections }) => {
	const { t } = useTranslation("common");
	const { Slot } = defineSlots(children, ["errorPanel", "extraContent"]);
	const userEvents = useAnalyticsContext();
	return /* @__PURE__ */ jsxs("div", {
		role: "region",
		children: [/* @__PURE__ */ jsx(Header, {
			title: t(($) => $["summary"]),
			description: t(($) => $["summaryDescription"])
		}), /* @__PURE__ */ jsxs(StackLayout, { children: [
			/* @__PURE__ */ jsx(Slot, { name: "errorPanel" }),
			sections.map(({ formId, label, items }) => {
				if (formId === "summary") return;
				return /* @__PURE__ */ jsx(SummarySection, {
					formId,
					label,
					items,
					action: /* @__PURE__ */ jsx(IconButton, {
						variant: "tertiary",
						icon: "edit",
						onClick: () => {
							trackNavigation({
								userEvents,
								actionType: "edit",
								toForm: label,
								label: "Pencil icon"
							});
							handleEditForm(formId);
						},
						ariaLabel: t(($) => $["editForm"], { formName: label })
					})
				}, formId);
			}),
			/* @__PURE__ */ jsx(Slot, { name: "extraContent" })
		] })]
	});
};
//#endregion
export { SummarySection as n, NewSummary as t };
