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.

71 lines (70 loc) 4.56 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] = "3f260822-8499-4242-a749-ce093d784814", e._sentryDebugIdIdentifier = "sentry-dbid-3f260822-8499-4242-a749-ce093d784814"); } 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 } from "./useLegalEntity-CtlUQv_J.js"; import { t as getLegalEntityCountry } from "./getLegalEntityCountry-BHh7Ux8v.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 { r as BusinessDetailsDropin, t as useBusinessDetailsData } from "./useBusinessDetailsData-DJTYbNJ4.js"; import { jsx } from "preact/jsx-runtime"; import { skipToken } from "@tanstack/preact-query"; //#region src/components/SoleProprietorship/pages/SoleProprietorshipPage.tsx function SoleProprietorshipPage({ solePropId, onSubmit, handleHomeClick }) { const { i18n } = useTranslation(); const { data: solePropLe } = useLegalEntity(solePropId ?? skipToken); const capabilityProblems = useCapabilityProblems(); const { data, isLoading } = useBusinessDetailsData(TaskTypes.TRUST_MEMBER_COMPANY, solePropLe); addResourceBundles(i18n, [{ ns: "business", importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({ "../../Business/language/bg-BG.json": () => import("./bg-BG-L5wKtmmz.js"), "../../Business/language/cs-CZ.json": () => import("./cs-CZ-D4Pt8Gsx.js"), "../../Business/language/da-DK.json": () => import("./da-DK-C4wRpqMC.js"), "../../Business/language/de-DE.json": () => import("./de-DE-BOH-YgTt.js"), "../../Business/language/el-GR.json": () => import("./el-GR-C5NDkWDr.js"), "../../Business/language/en-US.json": () => import("./en-US-DXMKV9NN.js"), "../../Business/language/es-ES.json": () => import("./es-ES-CDFWEg9c.js"), "../../Business/language/es-LA.json": () => import("./es-LA-C7IleXTc.js"), "../../Business/language/et-EE.json": () => import("./et-EE-P4s_U3BI.js"), "../../Business/language/fi-FI.json": () => import("./fi-FI-Bed2SzCG.js"), "../../Business/language/fr-FR.json": () => import("./fr-FR-D_qhjXEC.js"), "../../Business/language/hr-HR.json": () => import("./hr-HR-DlPm5gxr.js"), "../../Business/language/hu-HU.json": () => import("./hu-HU-NJaOrfnP.js"), "../../Business/language/it-IT.json": () => import("./it-IT-BwxzsAX1.js"), "../../Business/language/ja-JP.json": () => import("./ja-JP-CNCeHdxj.js"), "../../Business/language/lt-LT.json": () => import("./lt-LT-VP6qtMAw.js"), "../../Business/language/lv-LV.json": () => import("./lv-LV-CQI0LxVf.js"), "../../Business/language/nl-NL.json": () => import("./nl-NL-BN5WtqQB.js"), "../../Business/language/no-NO.json": () => import("./no-NO-Cor-jWuN.js"), "../../Business/language/pl-PL.json": () => import("./pl-PL-BzOubawD.js"), "../../Business/language/pt-BR.json": () => import("./pt-BR-n0GcsM-Q.js"), "../../Business/language/pt-PT.json": () => import("./pt-PT-C-mvV1ZJ.js"), "../../Business/language/ro-RO.json": () => import("./ro-RO-CuooCG3m.js"), "../../Business/language/sk-SK.json": () => import("./sk-SK-DSaBObVa.js"), "../../Business/language/sl-SI.json": () => import("./sl-SI-KEJYXISh.js"), "../../Business/language/sv-SE.json": () => import("./sv-SE-Bhvd0GDr.js") }), `../../Business/language/${lang}.json`, 5) }]); if (isLoading || solePropId && !solePropLe) return /* @__PURE__ */ jsx(Loader, {}); const { rootLe, efpBusinessLines, documents } = data; const problems = capabilityProblems && solePropId ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, solePropId) : void 0; const country = getLegalEntityCountry(solePropLe ?? rootLe); return /* @__PURE__ */ jsx(BusinessDetailsDropin, { taskType: TaskTypes.SOLE_PROPRIETOR_COMPANY, legalEntityResponse: rootLe, efpBusinessLines, documents, associatedLegalArrangement: solePropLe, problems: problems ?? {}, country, onSubmit, handleHomeClick }); } //#endregion export { SoleProprietorshipPage };