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] = "acf16477-2086-4bf3-a61f-72108b354c4e", e._sentryDebugIdIdentifier = "sentry-dbid-acf16477-2086-4bf3-a61f-72108b354c4e");
} catch (e) {}
import { n as addResourceBundles, r as useTranslation } from "./translation-Br5wIPO-.js";
import { r as Loader } from "./Button-BDEdGXnd.js";
import { t as getLegalEntityCountry } from "./getLegalEntityCountry-C6bSV6sB.js";
import { t as useToggleContext } from "./useToggleContext-CLfowItk.js";
import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-CCXvMgfE.js";
import { C as EntityTypes } from "./processCapabilities-CDSEJpB8.js";
import { t as TaskTypes } from "./taskTypes-DWaxzvnQ.js";
import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-COcJt47f.js";
import { t as filterProblemsByTaskForms } from "./filterProblemsByTaskForms-CrTqhWJT.js";
import { n as getForms, r as BusinessDetailsDropin, t as useBusinessDetailsData } from "./useBusinessDetailsData-Cw0gVS-u.js";
import { jsx } from "preact/jsx-runtime";
//#region src/components/Business/pages/RootBusinessDetailsPage.tsx
var RootBusinessDetailsPage = ({ onSubmit, handleHomeClick }) => {
	const { i18n } = useTranslation();
	const capabilityProblems = useCapabilityProblems();
	const { isFeatureEnabled } = useToggleContext();
	const taskType = TaskTypes.BUSINESS_DETAILS;
	const { data, isLoading } = useBusinessDetailsData(taskType);
	addResourceBundles(i18n, [{
		ns: "business",
		importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
			"../language/bg-BG.json": () => import("./bg-BG-Cxa0jcnA.js"),
			"../language/cs-CZ.json": () => import("./cs-CZ-MU9Ub24D.js"),
			"../language/da-DK.json": () => import("./da-DK-Cx-Ux0WK.js"),
			"../language/de-DE.json": () => import("./de-DE-Cbpj1g3M.js"),
			"../language/el-GR.json": () => import("./el-GR-Dw8xMzqe.js"),
			"../language/en-US.json": () => import("./en-US-AkapGgCu.js"),
			"../language/es-ES.json": () => import("./es-ES-D7pe0Z8H.js"),
			"../language/et-EE.json": () => import("./et-EE-Dszx65le2.js"),
			"../language/fi-FI.json": () => import("./fi-FI-UJLb8Vk42.js"),
			"../language/fr-FR.json": () => import("./fr-FR-B6Moi9NF2.js"),
			"../language/hr-HR.json": () => import("./hr-HR-BZ31wjf92.js"),
			"../language/hu-HU.json": () => import("./hu-HU-BgRcKhFU2.js"),
			"../language/it-IT.json": () => import("./it-IT-D_ks7gfY2.js"),
			"../language/ja-JP.json": () => import("./ja-JP-B-5Ib5IT2.js"),
			"../language/lt-LT.json": () => import("./lt-LT-BJziTet92.js"),
			"../language/lv-LV.json": () => import("./lv-LV-C8O_oUFu2.js"),
			"../language/nl-NL.json": () => import("./nl-NL-BjbL2DHM2.js"),
			"../language/no-NO.json": () => import("./no-NO-DM2yevPv2.js"),
			"../language/pl-PL.json": () => import("./pl-PL-DC1Izk5I2.js"),
			"../language/pt-BR.json": () => import("./pt-BR-NPzViBFm2.js"),
			"../language/pt-PT.json": () => import("./pt-PT-BRLRSNh92.js"),
			"../language/ro-RO.json": () => import("./ro-RO-DsFDnuty2.js"),
			"../language/sk-SK.json": () => import("./sk-SK-CV-IEeZp2.js"),
			"../language/sl-SI.json": () => import("./sl-SI-Cg7e65lb2.js"),
			"../language/sv-SE.json": () => import("./sv-SE-Q7zk4V9W2.js")
		}), `../language/${lang}.json`, 3)
	}]);
	if (isLoading) return /* @__PURE__ */ jsx(Loader, {});
	const { rootLe, efpBusinessLines, documents } = data;
	const entityProblems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, rootLe.id) : void 0;
	const country = getLegalEntityCountry(rootLe);
	return /* @__PURE__ */ jsx(BusinessDetailsDropin, {
		taskType,
		legalEntityResponse: rootLe,
		efpBusinessLines,
		documents,
		problems: filterProblemsByTaskForms(entityProblems, Object.keys(getForms(country, taskType, isFeatureEnabled))),
		country,
		onSubmit,
		handleHomeClick
	});
};
//#endregion
export { RootBusinessDetailsPage };
