UNPKG

@adyen/kyc-components

Version:

This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.

70 lines (69 loc) 4.33 kB
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] = "cedaa991-fe15-480e-9bd3-3e425d4f1fd9", e._sentryDebugIdIdentifier = "sentry-dbid-cedaa991-fe15-480e-9bd3-3e425d4f1fd9"); } catch (e) {} import { n as addResourceBundles, r as useTranslation } from "./translation-BYvhW5zA.js"; import { A as _rolldown_dynamic_import_helper_default } from "./resolveEnvironment-DNmu53Rr.js"; import { r as Loader } from "./Button-i8I2dHP8.js"; import { r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-CtlUQv_J.js"; import { C as EntityTypes } from "./processCapabilities-fPuXc9gL.js"; import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-D6XC4DZ2.js"; import { t as useNavigate } from "./useNavigate-i7J4ofUG.js"; import { t as PayoutDetailsDropinMultiForm } from "./PayoutDetailsDropinMultiForm-CyGVEwKC.js"; import { jsx } from "preact/jsx-runtime"; import { useParams } from "wouter-preact"; //#region src/components/BankAccount/pages/PayoutDetailsPage.tsx function PayoutDetailsPage({ transferInstrumentId: transferInstrumentIdProp, setTransferInstrumentId: setTransferInstrumentIdProp, taskType, openBankingPartnerConfigId, onSubmit, handleHomeClick }) { const routeParams = useParams(); const navigate = useNavigate(); const transferInstrumentId = transferInstrumentIdProp ?? routeParams.transferInstrumentId; const setTransferInstrumentId = setTransferInstrumentIdProp ?? ((id) => navigate.replace(taskType, { transferInstrumentId: id })); const { i18n } = useTranslation(); const { data: rootLe } = useLegalEntity(ROOT_LE); const capabilityProblems = useCapabilityProblems(); addResourceBundles(i18n, [{ ns: "banking", importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({ "../language/bg-BG.json": () => import("./bg-BG-DYnhOtaS.js"), "../language/cs-CZ.json": () => import("./cs-CZ-DvmlHVW2.js"), "../language/da-DK.json": () => import("./da-DK-DDQUbqDb.js"), "../language/de-DE.json": () => import("./de-DE-DdOrCrMa.js"), "../language/el-GR.json": () => import("./el-GR-Bm9lqjyB.js"), "../language/en-US.json": () => import("./en-US-Dokjxy17.js"), "../language/es-ES.json": () => import("./es-ES-_w6Ygc8E.js"), "../language/es-LA.json": () => import("./es-LA-Cxk68z4n.js"), "../language/et-EE.json": () => import("./et-EE-CG66kNTM.js"), "../language/fi-FI.json": () => import("./fi-FI-DpgrKo5I.js"), "../language/fr-FR.json": () => import("./fr-FR-BN_jrAX4.js"), "../language/hr-HR.json": () => import("./hr-HR-SwSOMPhJ.js"), "../language/hu-HU.json": () => import("./hu-HU-BqW_xlCb.js"), "../language/it-IT.json": () => import("./it-IT-xc14pqAr.js"), "../language/ja-JP.json": () => import("./ja-JP-ClFJvhe2.js"), "../language/lt-LT.json": () => import("./lt-LT-CTtqyA86.js"), "../language/lv-LV.json": () => import("./lv-LV-D_9V3gBo.js"), "../language/nl-NL.json": () => import("./nl-NL-_NV5Dvt9.js"), "../language/no-NO.json": () => import("./no-NO-CoDL_uMQ.js"), "../language/pl-PL.json": () => import("./pl-PL-Bgrz9oPS.js"), "../language/pt-BR.json": () => import("./pt-BR-DUAQ_vv4.js"), "../language/pt-PT.json": () => import("./pt-PT-B6mC3m94.js"), "../language/ro-RO.json": () => import("./ro-RO-ClCWcOZD.js"), "../language/sk-SK.json": () => import("./sk-SK-CieZx5AS.js"), "../language/sl-SI.json": () => import("./sl-SI-DbVFyYEg.js"), "../language/sv-SE.json": () => import("./sv-SE-WmQ6EnrS.js") }), `../language/${lang}.json`, 3) }]); if (!rootLe) return /* @__PURE__ */ jsx(Loader, {}); return /* @__PURE__ */ jsx(PayoutDetailsDropinMultiForm, { taskType, currentTransferInstrumentId: transferInstrumentId, setCurrentTransferInstrumentId: setTransferInstrumentId, legalEntityResponse: rootLe, problems: capabilityProblems && transferInstrumentId ? getProblemsForEntity(capabilityProblems, EntityTypes.BANK_ACCOUNT, transferInstrumentId) : void 0, onSubmit, handleHomeClick, navigateBackToTaskList: handleHomeClick, openBankingPartnerConfigId }); } //#endregion export { PayoutDetailsPage };