UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

33 lines (32 loc) 914 B
import { supportedCountries as c, supportedRegions as a, SupportedLocation as n } from "./constants.js"; const r = (o) => o?.regions?.find((t) => t.type === "capital")?.value ?? "", i = (o) => { switch (o) { case n.EU: return "capital.common.loanProviderInfo.EU"; default: return null; } }, u = (o) => { switch (o) { case n.AU: return "capital.common.loanProviderInfo.AU"; case n.GB: return "capital.common.loanProviderInfo.GB"; case n.US: return "capital.common.loanProviderInfo.US"; case n.CA: return "capital.common.loanProviderInfo.CA"; default: return null; } }, s = (o) => { const e = r(o), t = o?.countryCode; return u(t) ?? i(e); }, p = (o) => { const e = r(o), t = o?.countryCode ?? ""; return c.includes(t) || a.includes(e); }; export { s as getCapitalHeaderSubtitleByLegalEntity, p as isCapitalRegionSupported };