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] = "c39e1ef3-8893-42ce-8a73-e92e7ad5e778", e._sentryDebugIdIdentifier = "sentry-dbid-c39e1ef3-8893-42ce-8a73-e92e7ad5e778");
} catch (e) {}
import { i as Typography, r as useTranslation } from "./translation-Br5wIPO-.js";
import { n as IconButton } from "./Button-BDEdGXnd.js";
import { t as StackLayout } from "./StackLayout-BMQXXBDb.js";
import { t as Header } from "./Header-B_MIsVov.js";
import { t as useAnalyticsContext } from "./useAnalyticsContext-DfTXpZbA.js";
import { t as List } from "./List-DLrcpMVd.js";
import { t as StructuredList } from "./StructuredList-S4LIZQiJ.js";
import { t as trackNavigation } from "./trackNavigation-LvCP5Vyc.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 };
