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] = "bd91a141-624b-45e0-91ef-a25a8ed1d15b", e._sentryDebugIdIdentifier = "sentry-dbid-bd91a141-624b-45e0-91ef-a25a8ed1d15b");
} catch (e) {}
import { n as addResourceBundles, r as useTranslation } from "./translation-Br5wIPO-.js";
import { r as Loader } from "./Button-BDEdGXnd.js";
import { r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-Dm6g0wmt.js";
import { t as getLegalEntityCountry } from "./getLegalEntityCountry-C6bSV6sB.js";
import { t as useAccountHolder } from "./useAccountHolder-BUQwFdWW.js";
import { a as noop } from "./AnalyticsContext-C0HNdPss.js";
import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-CCXvMgfE.js";
import { C as EntityTypes, c as individualBaseMapping } from "./processCapabilities-CDSEJpB8.js";
import { t as TaskTypes } from "./taskTypes-DWaxzvnQ.js";
import { o as isPartOfTrustFromLegalEntity } from "./trustUtil-CVipffas.js";
import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-COcJt47f.js";
import { t as filterProblemsByTaskForms } from "./filterProblemsByTaskForms-CrTqhWJT.js";
import { n as getTrustedFields, r as getTrustedFieldsProvider } from "./getTrustedFields-BF_CmfLe.js";
import { n as individualForms, t as IndividualDropin } from "./IndividualDropin-DImA9Gce.js";
import { jsx } from "preact/jsx-runtime";
//#region src/components/Individual/pages/RootIndividualDetailsPage.tsx
function RootIndividualDetailsPage({ asModal = false, hideSidebar = false, isTargetLegalEntityType = false, onSubmit, handleBackClick, handleCloseClick, handleHomeClick = noop }) {
	const { data: rootLe } = useLegalEntity(ROOT_LE);
	const capabilityProblems = useCapabilityProblems();
	const { accountHolder } = useAccountHolder();
	const { i18n } = useTranslation();
	addResourceBundles(i18n, [{
		ns: "individual",
		importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
			"../language/bg-BG.json": () => import("./bg-BG-CS6SQDE2.js"),
			"../language/cs-CZ.json": () => import("./cs-CZ-C-nfIYKA.js"),
			"../language/da-DK.json": () => import("./da-DK-DO88W3qD.js"),
			"../language/de-DE.json": () => import("./de-DE-YX6rtv17.js"),
			"../language/el-GR.json": () => import("./el-GR-Be15a5W8.js"),
			"../language/en-US.instructions.json": () => import("./en-US.instructions-CXa3foCe.js"),
			"../language/en-US.json": () => import("./en-US-BDZwHN0Y.js"),
			"../language/es-ES.json": () => import("./es-ES-D1BkDJkz.js"),
			"../language/et-EE.json": () => import("./et-EE-BZ26f0MN.js"),
			"../language/fi-FI.json": () => import("./fi-FI-CeJPt0gg.js"),
			"../language/fr-FR.json": () => import("./fr-FR-lfoSPY0e.js"),
			"../language/hr-HR.json": () => import("./hr-HR-CMgsuYh2.js"),
			"../language/hu-HU.json": () => import("./hu-HU-C0Y9wmOY.js"),
			"../language/it-IT.json": () => import("./it-IT-Cm3ujfY_.js"),
			"../language/ja-JP.json": () => import("./ja-JP-BbXt47jb.js"),
			"../language/lt-LT.json": () => import("./lt-LT-CDdoDT7A.js"),
			"../language/lv-LV.json": () => import("./lv-LV-DpfhFur0.js"),
			"../language/nl-NL.json": () => import("./nl-NL-B0uwKjKV.js"),
			"../language/no-NO.json": () => import("./no-NO-BlsDONGK.js"),
			"../language/pl-PL.json": () => import("./pl-PL-Ct3cI8Sk.js"),
			"../language/pt-BR.json": () => import("./pt-BR-CqDjOIYt.js"),
			"../language/pt-PT.json": () => import("./pt-PT-Dl_yfKGH.js"),
			"../language/ro-RO.json": () => import("./ro-RO-D9YjxrDi.js"),
			"../language/sk-SK.json": () => import("./sk-SK-CQ1N3c8X.js"),
			"../language/sl-SI.json": () => import("./sl-SI-B8-rZ169.js"),
			"../language/sv-SE.json": () => import("./sv-SE-guJk9E1n.js")
		}), `../language/${lang}.json`, 3)
	}]);
	if (!rootLe) return /* @__PURE__ */ jsx(Loader, {});
	const country = getLegalEntityCountry(rootLe);
	const hasTrust = accountHolder === "aTrust" || isPartOfTrustFromLegalEntity(rootLe);
	const problemsByTask = filterProblemsByTaskForms(capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, rootLe.id) : void 0, Object.keys(individualForms));
	const trustedFieldsProvider = getTrustedFieldsProvider(rootLe);
	const trustedFields = getTrustedFields(rootLe, individualBaseMapping);
	return /* @__PURE__ */ jsx(IndividualDropin, {
		taskType: TaskTypes.INDIVIDUAL,
		taskName: hasTrust ? "individualTrusteeDetails" : "individualDetails",
		legalEntityResponse: rootLe,
		problems: problemsByTask,
		country,
		asModal,
		hideSidebar,
		isTargetLegalEntityType,
		onSubmit,
		trustedFieldsProvider,
		handleBackClick,
		handleCloseClick,
		handleHomeClick,
		trustedFields
	});
}
//#endregion
export { RootIndividualDetailsPage };
