import { n as useTranslation } from "./i18n-DoP1NB7u.js";
import { _ as y, l as A, v as u } from "./vendor-preact-DThS2ZQ_.js";
import { r as Spacer } from "./loadingIcon-B0ysgiNq.js";
import { t as Page } from "./page-DidH_RkX.js";
import { t as Title } from "./typography-BZIpjo97.js";
import { t as Button } from "./button-BMYTQ8fc.js";
//#region src/shared/icons/redStrikeIcon.tsx
var RedStrikeIcon = ({ className, ...rest }) => /* @__PURE__ */ u("svg", {
	class: className,
	width: "33",
	height: "32",
	viewBox: "0 0 33 32",
	fill: "none",
	xmlns: "http://www.w3.org/2000/svg",
	"aria-hidden": "true",
	...rest,
	children: /* @__PURE__ */ u("path", {
		d: "M16.5 0C25.3219 0 32.5 7.17642 32.5 16C32.5 24.8219 25.3219 32 16.5 32C7.67811 32 0.5 24.8219 0.5 16C0.5 7.17642 7.67811 0 16.5 0ZM13.6553 11.3701C13.1618 10.8767 12.3636 10.8767 11.8701 11.3701C11.3767 11.8636 11.3767 12.6618 11.8701 13.1553L14.9053 16.1924L11.8721 19.2256C11.3803 19.7191 11.3803 20.5173 11.8721 21.0107C12.3656 21.504 13.1658 21.5041 13.6592 21.0107L16.6924 17.9775L19.7334 21.0205C19.981 21.2664 20.3029 21.3916 20.6279 21.3916C20.9513 21.3916 21.2746 21.2664 21.5205 21.0205C22.014 20.527 22.014 19.7269 21.5205 19.2334L18.4775 16.1924L21.5107 13.1572C22.0041 12.6638 22.004 11.8639 21.5107 11.3721C21.0173 10.8786 20.2191 10.8786 19.7256 11.3721L16.6904 14.4053L13.6553 11.3701Z",
		fill: "#E71111"
	})
});
//#endregion
//#region src/shared/expiredId/expiredId.tsx
/**
* Shown when the backend reports `isDocumentExpired: true`. Exactly one of
* `onRetry` / `onContinue` should be provided; if both are passed, retry
* takes precedence.
*
* Visual contract mirrors the SDK 1 UXv2 Expired ID screen (red strike icon,
* centered title + subtitle, full-width primary button anchored near the
* bottom). The optional attempts counter (added by core PR #439 / SDK 1
* `IdError` parity) renders only when `attemptsRemaining` is supplied.
*/
var ExpiredId = ({ onRetry, onContinue, attemptsRemaining }) => {
	const { t } = useTranslation();
	const titleRef = A(null);
	y(() => {
		titleRef.current?.focus();
	}, []);
	return /* @__PURE__ */ u(Page, {
		hideHeader: true,
		hideFooterBranding: true,
		className: "IncodeIdExpiredPage",
		"data-testid": "expired-id",
		children: [/* @__PURE__ */ u("div", {
			class: "IncodeIdExpiredContent",
			role: "alert",
			children: [
				/* @__PURE__ */ u(RedStrikeIcon, { className: "IncodeIdExpiredIcon" }),
				/* @__PURE__ */ u(Title, {
					ref: titleRef,
					tabIndex: -1,
					className: "IncodeIdExpiredTitle",
					children: t("idv2.capture.notifications.expiredId")
				}),
				/* @__PURE__ */ u(Spacer, { size: 12 }),
				/* @__PURE__ */ u("p", {
					class: "IncodeIdExpiredSubtitle",
					children: t("idv2.capture.expiredId.pleaseTryWithADifferentId")
				}),
				/* @__PURE__ */ u(Spacer, { size: 80 }),
				attemptsRemaining !== void 0 ? /* @__PURE__ */ u("p", {
					class: "IncodeIdExpiredAttemptsCounter",
					"data-testid": "expired-id-attempts-counter",
					children: `${attemptsRemaining} ${t("idv2.capture.processing.attemptsRemainingLabel")}`
				}) : null
			]
		}), /* @__PURE__ */ u("div", {
			class: "IncodeIdExpiredButtonContainer",
			children: onRetry ? /* @__PURE__ */ u(Button, {
				variant: "primary",
				onClick: onRetry,
				"data-testid": "expired-id-retry",
				children: t("idv2.capture.processing.tryAgain")
			}) : onContinue ? /* @__PURE__ */ u(Button, {
				variant: "primary",
				onClick: onContinue,
				"data-testid": "expired-id-continue",
				children: t("idv2.capture.processing.continue")
			}) : null
		})]
	});
};
//#endregion
export { RedStrikeIcon as n, ExpiredId as t };
