;
{
  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] = "527f6cc4-5a33-49f3-b2c9-4df1904324d1", e._sentryDebugIdIdentifier = "sentry-dbid-527f6cc4-5a33-49f3-b2c9-4df1904324d1");
  } catch (e) {
  }
}
;
import { u as useTranslation, c as useLegalEntity, g as getLegalEntityCountry, a as addResourceBundles, _ as __variableDynamicImportRuntimeHelper, L as Loader } from "./StoreProvider-CqQrndhS.js";
import { jsx } from "preact/jsx-runtime";
import { useMemo } from "preact/hooks";
import { M as MaybeModal } from "./MaybeModal-C21jAgAp.js";
import { B as BusinessFinancingDropin } from "./BusinessFinancingDropin-Cj8pyTlQ.js";
function BusinessFinancingComponent({
  legalEntityId,
  onSubmitSuccess,
  asModal,
  handleCloseClick
}) {
  const { i18n } = useTranslation();
  const { data: rootLegalEntity } = useLegalEntity(legalEntityId);
  const country = useMemo(
    () => rootLegalEntity ? getLegalEntityCountry(rootLegalEntity) : void 0,
    [rootLegalEntity]
  );
  addResourceBundles(i18n, [
    { ns: "common", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../../language/locales/bg-BG.json": () => import("./bg-BG-6XzbmxcW.js"), "../../../language/locales/cs-CZ.json": () => import("./cs-CZ-C6vEQ8P9.js"), "../../../language/locales/da-DK.json": () => import("./da-DK-DzcTI92X.js"), "../../../language/locales/de-DE.json": () => import("./de-DE-dPfrbCii.js"), "../../../language/locales/el-GR.json": () => import("./el-GR-Dazirlmt.js"), "../../../language/locales/en-US.instructions.json": () => import("./en-US.instructions-Ddr7AO05.js"), "../../../language/locales/en-US.json": () => import("./StoreProvider-CqQrndhS.js").then((n) => n.bF), "../../../language/locales/es-ES.json": () => import("./es-ES--IvNed_Q.js"), "../../../language/locales/et-EE.json": () => import("./et-EE-CsTXSlnY.js"), "../../../language/locales/fi-FI.json": () => import("./fi-FI-BUixKfXH.js"), "../../../language/locales/fr-FR.json": () => import("./fr-FR-BM-qNLci.js"), "../../../language/locales/hr-HR.json": () => import("./hr-HR-BF74vdPD.js"), "../../../language/locales/hu-HU.json": () => import("./hu-HU-DYhMVR_c.js"), "../../../language/locales/it-IT.json": () => import("./it-IT-D63gRTDc.js"), "../../../language/locales/ja-JP.json": () => import("./ja-JP-DL0IjTzn.js"), "../../../language/locales/lt-LT.json": () => import("./lt-LT-BX8dOAzK.js"), "../../../language/locales/lv-LV.json": () => import("./lv-LV-dA8yYdKe.js"), "../../../language/locales/nl-NL.json": () => import("./nl-NL-KQ6bciOb.js"), "../../../language/locales/no-NO.json": () => import("./no-NO-Ds3VioxT.js"), "../../../language/locales/pl-PL.json": () => import("./pl-PL-BgbxWHGE.js"), "../../../language/locales/pt-BR.json": () => import("./pt-BR-Ct4s4jXV.js"), "../../../language/locales/pt-PT.json": () => import("./pt-PT-DBEsmXQX.js"), "../../../language/locales/ro-RO.json": () => import("./ro-RO-C00Ig8CL.js"), "../../../language/locales/sk-SK.json": () => import("./sk-SK-BbJWayDh.js"), "../../../language/locales/sl-SI.json": () => import("./sl-SI-hxwQIw_i.js"), "../../../language/locales/sv-SE.json": () => import("./sv-SE-0PQ-U1u6.js") }), `../../../language/locales/${lang}.json`, 6) },
    { ns: "ui", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../ui/language/bg-BG.json": () => import("./bg-BG-zZhDshGi.js"), "../../ui/language/cs-CZ.json": () => import("./cs-CZ-Ck22NTT9.js"), "../../ui/language/da-DK.json": () => import("./da-DK-DQ4ZYSea.js"), "../../ui/language/de-DE.json": () => import("./de-DE-CkbOZ6S_.js"), "../../ui/language/el-GR.json": () => import("./el-GR-DudORw4U.js"), "../../ui/language/en-US.json": () => import("./en-US-CjjPhkB5.js"), "../../ui/language/es-ES.json": () => import("./es-ES-BAolMrZ0.js"), "../../ui/language/et-EE.json": () => import("./et-EE-BOIrYrz9.js"), "../../ui/language/fi-FI.json": () => import("./fi-FI-D8WrLxxq.js"), "../../ui/language/fr-FR.json": () => import("./fr-FR-Beljeilc.js"), "../../ui/language/hr-HR.json": () => import("./hr-HR-lIHN6Yl2.js"), "../../ui/language/hu-HU.json": () => import("./hu-HU-CWdwNCev.js"), "../../ui/language/it-IT.json": () => import("./it-IT-5a7NHVFo.js"), "../../ui/language/ja-JP.json": () => import("./ja-JP-DSvZhFNY.js"), "../../ui/language/lt-LT.json": () => import("./lt-LT-CgalYpUh.js"), "../../ui/language/lv-LV.json": () => import("./lv-LV-aAd9SEqx.js"), "../../ui/language/nl-NL.json": () => import("./nl-NL-CmURERx_.js"), "../../ui/language/no-NO.json": () => import("./no-NO-qyqWODMp.js"), "../../ui/language/pl-PL.json": () => import("./pl-PL-q9azN24o.js"), "../../ui/language/pt-BR.json": () => import("./pt-BR-BxoOF8jB.js"), "../../ui/language/pt-PT.json": () => import("./pt-PT-pIChDwiI.js"), "../../ui/language/ro-RO.json": () => import("./ro-RO-DRsaNX9j.js"), "../../ui/language/sk-SK.json": () => import("./sk-SK-7-enbO1N.js"), "../../ui/language/sl-SI.json": () => import("./sl-SI-DTvJT7fC.js"), "../../ui/language/sv-SE.json": () => import("./sv-SE-N-Hqwcjq.js") }), `../../ui/language/${lang}.json`, 5) },
    {
      ns: "businessFinancing",
      importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../EFP/tasks/BusinessFinancingDropin/language/bg-BG.json": () => import("./bg-BG-wVquMNtT.js"), "../../EFP/tasks/BusinessFinancingDropin/language/cs-CZ.json": () => import("./cs-CZ--jOkoHVS.js"), "../../EFP/tasks/BusinessFinancingDropin/language/da-DK.json": () => import("./da-DK-JHZnsI59.js"), "../../EFP/tasks/BusinessFinancingDropin/language/de-DE.json": () => import("./de-DE-VGGEkxUT.js"), "../../EFP/tasks/BusinessFinancingDropin/language/el-GR.json": () => import("./el-GR-gkaKwnln.js"), "../../EFP/tasks/BusinessFinancingDropin/language/en-US.json": () => import("./en-US-D1sB335h.js"), "../../EFP/tasks/BusinessFinancingDropin/language/es-ES.json": () => import("./es-ES-Bn9_0wK0.js"), "../../EFP/tasks/BusinessFinancingDropin/language/et-EE.json": () => import("./et-EE-BYSnV6Iq.js"), "../../EFP/tasks/BusinessFinancingDropin/language/fi-FI.json": () => import("./fi-FI-PVFqd5Ra.js"), "../../EFP/tasks/BusinessFinancingDropin/language/fr-FR.json": () => import("./fr-FR-mJK4hjwD.js"), "../../EFP/tasks/BusinessFinancingDropin/language/hr-HR.json": () => import("./hr-HR-qmYyO-nT.js"), "../../EFP/tasks/BusinessFinancingDropin/language/hu-HU.json": () => import("./hu-HU-CS-7iNS4.js"), "../../EFP/tasks/BusinessFinancingDropin/language/it-IT.json": () => import("./it-IT-BTWkWSJq.js"), "../../EFP/tasks/BusinessFinancingDropin/language/ja-JP.json": () => import("./ja-JP-CceCDXLB.js"), "../../EFP/tasks/BusinessFinancingDropin/language/lt-LT.json": () => import("./lt-LT-B6XmKUXx.js"), "../../EFP/tasks/BusinessFinancingDropin/language/lv-LV.json": () => import("./lv-LV-DsSpy50n.js"), "../../EFP/tasks/BusinessFinancingDropin/language/nl-NL.json": () => import("./nl-NL-CTf7zH4M.js"), "../../EFP/tasks/BusinessFinancingDropin/language/no-NO.json": () => import("./no-NO-RfTK9KAV.js"), "../../EFP/tasks/BusinessFinancingDropin/language/pl-PL.json": () => import("./pl-PL-Dy8qWH39.js"), "../../EFP/tasks/BusinessFinancingDropin/language/pt-BR.json": () => import("./pt-BR-BbFJsIVX.js"), "../../EFP/tasks/BusinessFinancingDropin/language/pt-PT.json": () => import("./pt-PT-B4F_5NWi.js"), "../../EFP/tasks/BusinessFinancingDropin/language/ro-RO.json": () => import("./ro-RO-CICjAFys.js"), "../../EFP/tasks/BusinessFinancingDropin/language/sk-SK.json": () => import("./sk-SK-BRd5TN22.js"), "../../EFP/tasks/BusinessFinancingDropin/language/sl-SI.json": () => import("./sl-SI-D8dDckrW.js"), "../../EFP/tasks/BusinessFinancingDropin/language/sv-SE.json": () => import("./sv-SE-DGpvVvWj.js") }), `../../EFP/tasks/BusinessFinancingDropin/language/${lang}.json`, 7)
    }
  ]);
  const handleFinishClick = (data) => {
    handleCloseClick?.();
    onSubmitSuccess?.(data);
  };
  if (!rootLegalEntity || !country) {
    return /* @__PURE__ */ jsx(Loader, {});
  }
  return /* @__PURE__ */ jsx(MaybeModal, { inline: !asModal, onClose: handleCloseClick, inset: true, children: /* @__PURE__ */ jsx(
    BusinessFinancingDropin,
    {
      country,
      rootLegalEntity,
      externalOnSubmit: handleFinishClick,
      handleHomeClick: handleCloseClick,
      isStandaloneComponent: true
    }
  ) });
}
export {
  BusinessFinancingComponent as B
};
