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] = "726abfcf-ad76-40b3-a459-da6a2387b62b", e._sentryDebugIdIdentifier = "sentry-dbid-726abfcf-ad76-40b3-a459-da6a2387b62b");
} catch (e) {}
import { n as addResourceBundles, r as useTranslation } from "./translation-DYpZlvOH.js";
import { r as Loader } from "./Button-DOLNhJTG.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-CI_g2ItO.js";
import { t as TaskTypes } from "./taskTypes-DWaxzvnQ.js";
import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-DWdc4uXg.js";
import { t as filterProblemsByTaskForms } from "./filterProblemsByTaskForms-DGjmBtpp.js";
import { n as BusinessDetailsDropin, r as getForms, t as useBusinessDetailsData } from "./useBusinessDetailsData-D4r7dLvh.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-ClQ8gVST.js"),
			"../language/cs-CZ.json": () => import("./cs-CZ-DhQcomjq.js"),
			"../language/da-DK.json": () => import("./da-DK-C1o_L_2y.js"),
			"../language/de-DE.json": () => import("./de-DE-DA8Kde6U.js"),
			"../language/el-GR.json": () => import("./el-GR-BIOa9u-k.js"),
			"../language/en-US.json": () => import("./en-US-CNZ6mn72.js"),
			"../language/es-ES.json": () => import("./es-ES-DqH_2BDZ.js"),
			"../language/et-EE.json": () => import("./et-EE-B4DF7PzU.js"),
			"../language/fi-FI.json": () => import("./fi-FI-Bj7jQFUu.js"),
			"../language/fr-FR.json": () => import("./fr-FR-VJhJdUR3.js"),
			"../language/hr-HR.json": () => import("./hr-HR-CL7kqD2b.js"),
			"../language/hu-HU.json": () => import("./hu-HU-DA9w7tO6.js"),
			"../language/it-IT.json": () => import("./it-IT-CY_vegId2.js"),
			"../language/ja-JP.json": () => import("./ja-JP-VcSPyl_32.js"),
			"../language/lt-LT.json": () => import("./lt-LT-DobhtEZs2.js"),
			"../language/lv-LV.json": () => import("./lv-LV-BtkNCMsa2.js"),
			"../language/nl-NL.json": () => import("./nl-NL-BSwNMg8Q2.js"),
			"../language/no-NO.json": () => import("./no-NO-Dh0N0tCB2.js"),
			"../language/pl-PL.json": () => import("./pl-PL-YkPY-Ggy2.js"),
			"../language/pt-BR.json": () => import("./pt-BR-hXUEDsBy2.js"),
			"../language/pt-PT.json": () => import("./pt-PT-x8WvjpVk2.js"),
			"../language/ro-RO.json": () => import("./ro-RO-DcsY_8JB2.js"),
			"../language/sk-SK.json": () => import("./sk-SK-7BtruJjk2.js"),
			"../language/sl-SI.json": () => import("./sl-SI-4QS5gF-j2.js"),
			"../language/sv-SE.json": () => import("./sv-SE-CevWvsYN2.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 };
