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] = "8d126dd5-e2d3-43bf-b193-6f9e31dbf498", e._sentryDebugIdIdentifier = "sentry-dbid-8d126dd5-e2d3-43bf-b193-6f9e31dbf498");
} catch (e) {}
import { n as addResourceBundles, r as useTranslation } from "./translation-Br5wIPO-.js";
import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-BcrJH82n.js";
import { s as useApiContext } from "./http-CHTzpXCd.js";
import { r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-Dm6g0wmt.js";
import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-CCXvMgfE.js";
import { t as emitAdyenSdkEvent } from "./emitEvent-DYC1em5m.js";
import { t as useOnboardingStatus } from "./useOnboardingStatus-CdLObhIM.js";
import { t as OnboardingStatuses } from "./view-verification-status-C3zAZhYk.js";
import { t as EmbeddedStatus } from "./EmbeddedStatus-Ch7vvcve.js";
import register from "preact-custom-element";
import { useRef } from "preact/hooks";
import { jsx } from "preact/jsx-runtime";
//#region src/components/EmbeddedDropins/ManageIndividualComponent/ManageIndividualComponent.tsx
function ManageIndividualComponent({ legalEntityId, onClick }) {
	const { i18n } = useTranslation();
	const { rootLegalEntityId: currentLegalEntityId } = useApiContext();
	currentLegalEntityId.value = legalEntityId;
	addResourceBundles(i18n, [{
		ns: "common",
		importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
			"../../../language/locales/bg-BG.json": () => import("./bg-BG-NwL6SZRu.js"),
			"../../../language/locales/cs-CZ.json": () => import("./cs-CZ-BZkot6xs.js"),
			"../../../language/locales/da-DK.json": () => import("./da-DK-Bc6oX5Ct.js"),
			"../../../language/locales/de-DE.json": () => import("./de-DE-JZBqb8ce.js"),
			"../../../language/locales/el-GR.json": () => import("./el-GR-C8jFvyDg.js"),
			"../../../language/locales/en-US.instructions.json": () => import("./en-US.instructions-DlxMDbRu.js"),
			"../../../language/locales/en-US.json": () => import("./en-US-Cq6Cl6Yl.js"),
			"../../../language/locales/es-ES.json": () => import("./es-ES-mdSA-CIT.js"),
			"../../../language/locales/et-EE.json": () => import("./et-EE-B4ZMHksf.js"),
			"../../../language/locales/fi-FI.json": () => import("./fi-FI-koFpyMaq.js"),
			"../../../language/locales/fr-FR.json": () => import("./fr-FR-B0eVVc8V.js"),
			"../../../language/locales/hr-HR.json": () => import("./hr-HR-D_X-RNUl.js"),
			"../../../language/locales/hu-HU.json": () => import("./hu-HU-3FpAw9b1.js"),
			"../../../language/locales/it-IT.json": () => import("./it-IT-BgULENxX.js"),
			"../../../language/locales/ja-JP.json": () => import("./ja-JP-BT70_5Cd.js"),
			"../../../language/locales/lt-LT.json": () => import("./lt-LT-CKltvr9j.js"),
			"../../../language/locales/lv-LV.json": () => import("./lv-LV-DwsdNJrk.js"),
			"../../../language/locales/nl-NL.json": () => import("./nl-NL-CxlTSECX.js"),
			"../../../language/locales/no-NO.json": () => import("./no-NO-FtH9gIpv.js"),
			"../../../language/locales/pl-PL.json": () => import("./pl-PL-CK40GB3R.js"),
			"../../../language/locales/pt-BR.json": () => import("./pt-BR-zUBVM8_b.js"),
			"../../../language/locales/pt-PT.json": () => import("./pt-PT-CxnB9Jff.js"),
			"../../../language/locales/ro-RO.json": () => import("./ro-RO-Cuw1RmFc.js"),
			"../../../language/locales/sk-SK.json": () => import("./sk-SK-1i0L4zIs.js"),
			"../../../language/locales/sl-SI.json": () => import("./sl-SI-D3zK3MPP.js"),
			"../../../language/locales/sv-SE.json": () => import("./sv-SE-CVRa-6Y0.js")
		}), `../../../language/locales/${lang}.json`, 6)
	}]);
	const { data: legalEntityData } = useLegalEntity(ROOT_LE);
	const { isPending, data: onboardingStatusData } = useOnboardingStatus({ refetchInterval: (res) => res.state.data?.status === OnboardingStatuses.AWAITING_DATA ? 3e3 : false });
	const name = legalEntityData?.individual?.name;
	const fullName = name ? `${name.firstName} ${name.lastName}` : "";
	const subtitle = legalEntityData?.individual?.email ?? "";
	const status = onboardingStatusData?.status;
	return /* @__PURE__ */ jsx(EmbeddedStatus, {
		onClick,
		title: fullName,
		subtitle,
		status,
		loading: isPending
	});
}
//#endregion
//#region src/embeds/individual-status/adyen-individual-status.tsx
/**
* Enables users to view their current verification status and update their information if necessary.
*/
var AdyenManageIndividual = ({ rootlegalentityid, fetchToken, environment, locale, settings = {}, experiments = {} }) => {
	const eventEmitterRef = useRef(null);
	const handleOnClick = () => {
		emitAdyenSdkEvent(eventEmitterRef, "click");
	};
	return /* @__PURE__ */ jsx("div", {
		ref: eventEmitterRef,
		style: "width:100%;",
		children: /* @__PURE__ */ jsx(EmbedShell, {
			componentName: "adyen-individual-status",
			rootLegalEntityId: rootlegalentityid,
			settings,
			features: experiments,
			getSdkToken: fetchToken,
			locale,
			baseUrl: resolveEnvironment(environment),
			children: /* @__PURE__ */ jsx(ManageIndividualComponent, {
				legalEntityId: rootlegalentityid,
				onClick: handleOnClick
			})
		})
	});
};
register(AdyenManageIndividual, "adyen-individual-status", [
	"rootlegalentityid",
	"fetchToken",
	"environment",
	"locale",
	"settings",
	"experiments"
], {
	shadow: true,
	adoptedStyleSheets: stylesheets
});
//#endregion
