;
{
  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] = "47dee08a-e695-4f9d-973f-bfb0cf1b9937", e._sentryDebugIdIdentifier = "sentry-dbid-47dee08a-e695-4f9d-973f-bfb0cf1b9937");
  } catch (e) {
  }
}
;
import { u as useTranslation, c as useLegalEntity, a as addResourceBundles, _ as __variableDynamicImportRuntimeHelper, L as Loader, j as TaskTypes } from "./StoreProvider-CqQrndhS.js";
import { jsx } from "preact/jsx-runtime";
import { useState } from "preact/hooks";
import { P as PayoutDetailsDropin } from "./PayoutDetailsDropin-DJtljNmL.js";
function CreateTransferInstrumentComponent({
  legalEntityId,
  transferInstrumentId,
  openBankingPartnerConfigId,
  modalView = false,
  onClose,
  onUnmount,
  onSubmitSuccess,
  handleBackClick
}) {
  const [currentTransferInstrumentId, setCurrentTransferInstrumentId] = useState(transferInstrumentId);
  const { i18n } = useTranslation();
  const { data: legalEntity, isLoading: isLegalEntityLoading } = useLegalEntity(legalEntityId);
  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: "banking", importFn: (lang) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../BankAccount/language/bg-BG.json": () => import("./bg-BG-DyX-yYYI.js"), "../../BankAccount/language/cs-CZ.json": () => import("./cs-CZ-BD5bYeuJ.js"), "../../BankAccount/language/da-DK.json": () => import("./da-DK-h8DYQ_Iq.js"), "../../BankAccount/language/de-DE.json": () => import("./de-DE-LQE_LFFL.js"), "../../BankAccount/language/el-GR.json": () => import("./el-GR-DGbzdIL0.js"), "../../BankAccount/language/en-US.json": () => import("./en-US-h0JneJJl.js"), "../../BankAccount/language/es-ES.json": () => import("./es-ES-DdGmXdxO.js"), "../../BankAccount/language/et-EE.json": () => import("./et-EE-D5SNtVsM.js"), "../../BankAccount/language/fi-FI.json": () => import("./fi-FI-CIYa9SyS.js"), "../../BankAccount/language/fr-FR.json": () => import("./fr-FR-l5z31r7i.js"), "../../BankAccount/language/hr-HR.json": () => import("./hr-HR-BtowKWUi.js"), "../../BankAccount/language/hu-HU.json": () => import("./hu-HU-MHIPehPS.js"), "../../BankAccount/language/it-IT.json": () => import("./it-IT-BAvmkEF8.js"), "../../BankAccount/language/ja-JP.json": () => import("./ja-JP-g6VOUGXZ.js"), "../../BankAccount/language/lt-LT.json": () => import("./lt-LT-DDs3ngzd.js"), "../../BankAccount/language/lv-LV.json": () => import("./lv-LV-CmB2-IO5.js"), "../../BankAccount/language/nl-NL.json": () => import("./nl-NL-DV4NqPVW.js"), "../../BankAccount/language/no-NO.json": () => import("./no-NO-B9618F4_.js"), "../../BankAccount/language/pl-PL.json": () => import("./pl-PL-DqzUSnFK.js"), "../../BankAccount/language/pt-BR.json": () => import("./pt-BR-zuqB_CBf.js"), "../../BankAccount/language/pt-PT.json": () => import("./pt-PT-CFY1O_K0.js"), "../../BankAccount/language/ro-RO.json": () => import("./ro-RO-7CJ4F5iB.js"), "../../BankAccount/language/sk-SK.json": () => import("./sk-SK-DubwJifw.js"), "../../BankAccount/language/sl-SI.json": () => import("./sl-SI-59OQIZ3f.js"), "../../BankAccount/language/sv-SE.json": () => import("./sv-SE-CQWBP7n1.js") }), `../../BankAccount/language/${lang}.json`, 5) }
  ]);
  const handleOnClose = () => {
    if (modalView) {
      onUnmount?.();
    }
    onClose?.();
  };
  return isLegalEntityLoading || !legalEntity ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
    PayoutDetailsDropin,
    {
      legalEntityResponse: legalEntity,
      openBankingPartnerConfigId,
      handleBackClick,
      handleCloseClick: handleOnClose,
      currentTransferInstrumentId,
      setCurrentTransferInstrumentId,
      onSubmit: onSubmitSuccess,
      taskType: TaskTypes.PAYOUT,
      hideSidebar: true,
      asModal: modalView
    }
  );
}
export {
  CreateTransferInstrumentComponent as C
};
