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.

79 lines (78 loc) 5.48 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] = "8a1f04df-512a-4b16-919a-266b069bf3f7", e._sentryDebugIdIdentifier = "sentry-dbid-8a1f04df-512a-4b16-919a-266b069bf3f7"); } catch (e) {} import { n as addResourceBundles, r as useTranslation } from "./translation-BFxyJ1c5.js"; import { r as Loader } from "./Button-oj6H8OrC.js"; import { r as useLegalEntity } from "./useLegalEntity-yxi9XhLi.js"; import { t as getLegalEntityCountry } from "./getLegalEntityCountry-C6bSV6sB.js"; import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-rq_tsyLP.js"; import { C as EntityTypes } from "./processCapabilities-DlZY9-Jc.js"; import { p as TaskTypes } from "./entityAssociationUtil-BEzUdPbm.js"; import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-BLcIg3x_.js"; import { t as useUnincorporatedPartnershipMembers } from "./useUnincorporatedPartnershipMembers-BfE3lulH.js"; import { n as BusinessDetailsDropin, t as useBusinessDetailsData } from "./useBusinessDetailsData-DGPg34HR.js"; import { jsx } from "preact/jsx-runtime"; import { skipToken } from "@tanstack/preact-query"; import { useParams } from "wouter-preact"; //#region src/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.tsx function UnincorporatedPartnershipMemberCompanyPage({ partnershipId, partnershipMemberCompanyId: partnershipMemberCompanyIdProp, newMember, onSubmit, handleHomeClick }) { const routeParams = useParams(); const partnershipMemberCompanyId = partnershipMemberCompanyIdProp ?? routeParams.memberId; const { i18n } = useTranslation(); const { data: partnershipLe } = useLegalEntity(partnershipId || skipToken); const { data: partnershipMemberCompanyLe } = useLegalEntity(partnershipMemberCompanyId || skipToken); const partnershipMembers = useUnincorporatedPartnershipMembers(); const capabilityProblems = useCapabilityProblems(); const { data, isLoading } = useBusinessDetailsData(TaskTypes.TRUST_MEMBER_COMPANY, partnershipLe, partnershipMemberCompanyLe); addResourceBundles(i18n, [{ ns: "business", importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({ "../../Business/language/bg-BG.json": () => import("./bg-BG-CodTfJR6.js"), "../../Business/language/cs-CZ.json": () => import("./cs-CZ-BLE9aLKg.js"), "../../Business/language/da-DK.json": () => import("./da-DK-DtAW2xZE.js"), "../../Business/language/de-DE.json": () => import("./de-DE-DXNTaizu.js"), "../../Business/language/el-GR.json": () => import("./el-GR-qH2iIn7-.js"), "../../Business/language/en-US.json": () => import("./en-US-DBiYkRmE.js"), "../../Business/language/es-ES.json": () => import("./es-ES-yxJhxnWV.js"), "../../Business/language/et-EE.json": () => import("./et-EE-C3h50xW-.js"), "../../Business/language/fi-FI.json": () => import("./fi-FI-wGXRm-tZ.js"), "../../Business/language/fr-FR.json": () => import("./fr-FR-mFwC-nNY.js"), "../../Business/language/hr-HR.json": () => import("./hr-HR-BAeB6ZDz.js"), "../../Business/language/hu-HU.json": () => import("./hu-HU-Bb1gk4Jr.js"), "../../Business/language/it-IT.json": () => import("./it-IT-CmoZrxWa.js"), "../../Business/language/ja-JP.json": () => import("./ja-JP-CyP1sKap.js"), "../../Business/language/lt-LT.json": () => import("./lt-LT-D0_qhzNo.js"), "../../Business/language/lv-LV.json": () => import("./lv-LV-Bfkan_1O.js"), "../../Business/language/nl-NL.json": () => import("./nl-NL-DXnNGqSV.js"), "../../Business/language/no-NO.json": () => import("./no-NO-B1v42GMO2.js"), "../../Business/language/pl-PL.json": () => import("./pl-PL-C5u2-nG22.js"), "../../Business/language/pt-BR.json": () => import("./pt-BR-9jLurhS32.js"), "../../Business/language/pt-PT.json": () => import("./pt-PT-B6DsKlac2.js"), "../../Business/language/ro-RO.json": () => import("./ro-RO-9TjoIVJf2.js"), "../../Business/language/sk-SK.json": () => import("./sk-SK-D5_Q4Djr2.js"), "../../Business/language/sl-SI.json": () => import("./sl-SI-CuNIMCGx2.js"), "../../Business/language/sv-SE.json": () => import("./sv-SE-C11kwGTV2.js") }), `../../Business/language/${lang}.json`, 5) }]); if (isLoading || !partnershipLe || partnershipMemberCompanyId && !partnershipMemberCompanyLe) return /* @__PURE__ */ jsx(Loader, {}); const { rootLe, efpBusinessLines, documents } = data; const problems = capabilityProblems && partnershipMemberCompanyId ? getProblemsForEntity(capabilityProblems, EntityTypes.LEGAL_ENTITY, partnershipMemberCompanyId) : void 0; const country = getLegalEntityCountry(partnershipMemberCompanyLe ?? partnershipLe); const partnershipMember = newMember ?? partnershipMembers.find((member) => member.legalEntityId === partnershipMemberCompanyId); return /* @__PURE__ */ jsx(BusinessDetailsDropin, { taskType: TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY, legalEntityResponse: rootLe, efpBusinessLines, documents, associatedLegalArrangement: partnershipLe, nestedLegalEntity: partnershipMemberCompanyLe, nestedLegalEntityDetails: partnershipMember, problems, country, onSubmit, handleHomeClick }); } //#endregion export { UnincorporatedPartnershipMemberCompanyPage };