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] = "c9c7f618-ea9c-4ae2-9cd8-ac7c638e5a2d", e._sentryDebugIdIdentifier = "sentry-dbid-c9c7f618-ea9c-4ae2-9cd8-ac7c638e5a2d");
} catch (e) {}
import { r as useTranslation } from "./translation-Br5wIPO-.js";
import { t as Alert } from "./Alert-CjZYipjN.js";
import { jsx } from "preact/jsx-runtime";
//#region src/components/ui/molecules/Alert/VerificationErrorAlert.tsx
var VerificationErrorAlert = ({ className, problems, children, fallbackErrorMessage }) => {
	const { t } = useTranslation("common");
	if (problems?.verificationErrors && Object.keys(problems.verificationErrors).length > 0) {
		const childErrors = Object.values(problems.verificationErrors).reduce((acc, parentChildErrors) => {
			acc = {
				...acc,
				...parentChildErrors
			};
			return acc;
		}, {});
		const childErrorCodes = Object.keys(childErrors);
		if (childErrorCodes.length === 1) {
			const remediationActions = Object.values(childErrors?.[childErrorCodes?.[0]] ?? {}).flat();
			if (remediationActions.length === 1) return /* @__PURE__ */ jsx(Alert, {
				className,
				variant: "error",
				title: `${t(($) => $[`errorMessage_${childErrorCodes[0]}`])}. ${t(($) => $[`remediationMessage_${remediationActions[0].code}`])}`,
				children
			});
		}
	}
	return /* @__PURE__ */ jsx(Alert, {
		className,
		variant: "error",
		title: fallbackErrorMessage ?? t(($) => $["verificationErrorMessage"]),
		children
	});
};
//#endregion
export { VerificationErrorAlert as t };
