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.

75 lines (74 loc) 4.47 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] = "18398d4d-59ad-41c6-9ef6-f3d49797e2ac", e._sentryDebugIdIdentifier = "sentry-dbid-18398d4d-59ad-41c6-9ef6-f3d49797e2ac"); } 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 { t as getLegalEntityCountry } from "./getLegalEntityCountry-BHh7Ux8v.js"; import { a as noop } from "./AnalyticsContext-BFrJmsp0.js"; import { C as EntityTypes } from "./processCapabilities-fPuXc9gL.js"; import { t as TaskTypes } from "./taskTypes-NawDTp5n.js"; import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-D6XC4DZ2.js"; import { t as IndividualDropin } from "./IndividualDropin-DHrcFHNx.js"; import { jsx } from "preact/jsx-runtime"; import { skipToken } from "@tanstack/preact-query"; //#region src/components/Individual/pages/LegalRepresentativeDetailsPage.tsx function LegalRepresentativeDetailsPage({ legalRepresentativeId, asModal = false, hideSidebar = false, onSubmit, handleBackClick, handleCloseClick, handleHomeClick = noop }) { const { data: legalRepresentativeLe } = useLegalEntity(legalRepresentativeId ?? skipToken); const { data: rootLe } = useLegalEntity(ROOT_LE); const capabilityProblems = useCapabilityProblems(); const { i18n } = useTranslation(); addResourceBundles(i18n, [{ ns: "individual", importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({ "../language/bg-BG.json": () => import("./bg-BG-VIyyeYUh.js"), "../language/cs-CZ.json": () => import("./cs-CZ-D8nnXFEh.js"), "../language/da-DK.json": () => import("./da-DK-Cq-1LB6T.js"), "../language/de-DE.json": () => import("./de-DE-Bc55gBv4.js"), "../language/el-GR.json": () => import("./el-GR-Cr-3NgPk.js"), "../language/en-US.instructions.json": () => import("./en-US.instructions-DfgivDPI.js"), "../language/en-US.json": () => import("./en-US-C1J9jcVI.js"), "../language/es-ES.json": () => import("./es-ES-uVSZu-EQ.js"), "../language/es-LA.json": () => import("./es-LA-BU5Op1kh.js"), "../language/et-EE.json": () => import("./et-EE-BFb0MPqf.js"), "../language/fi-FI.json": () => import("./fi-FI-BI9sCCEP.js"), "../language/fr-FR.json": () => import("./fr-FR-_TkFnevF.js"), "../language/hr-HR.json": () => import("./hr-HR-DubR_a2h.js"), "../language/hu-HU.json": () => import("./hu-HU-CK6lbZ-D.js"), "../language/it-IT.json": () => import("./it-IT-CVVOlFfY.js"), "../language/ja-JP.json": () => import("./ja-JP-B8sNFjt_.js"), "../language/lt-LT.json": () => import("./lt-LT-C9lXLzZA.js"), "../language/lv-LV.json": () => import("./lv-LV-2Q8G1u4p.js"), "../language/nl-NL.json": () => import("./nl-NL-DMdoFepr.js"), "../language/no-NO.json": () => import("./no-NO-CwgewQst.js"), "../language/pl-PL.json": () => import("./pl-PL-D-TVYshE.js"), "../language/pt-BR.json": () => import("./pt-BR-DwHag_mp.js"), "../language/pt-PT.json": () => import("./pt-PT-BVcFY8gr.js"), "../language/ro-RO.json": () => import("./ro-RO-D3Yk1KoW.js"), "../language/sk-SK.json": () => import("./sk-SK-D3UYKttr.js"), "../language/sl-SI.json": () => import("./sl-SI-BkcElOhl.js"), "../language/sv-SE.json": () => import("./sv-SE-DkZ2LyW5.js") }), `../language/${lang}.json`, 3) }]); if (!rootLe || legalRepresentativeId && !legalRepresentativeLe) return /* @__PURE__ */ jsx(Loader, {}); const country = getLegalEntityCountry(legalRepresentativeLe ?? rootLe); const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, rootLe.id) : void 0; return /* @__PURE__ */ jsx(IndividualDropin, { taskType: TaskTypes.LEGAL_REPRESENTATIVE_DETAILS, taskName: "legalRepresentativeDetails", legalEntityResponse: legalRepresentativeLe, parentLegalEntity: rootLe, problems, country, asModal, hideSidebar, onSubmit, handleBackClick, handleCloseClick, handleHomeClick }); } //#endregion export { LegalRepresentativeDetailsPage };