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)

37 lines (36 loc) 1.01 kB
import { supportedCountries as n, supportedRegions as s, SupportedLocation as o } from "./constants.js"; const u = (e) => { var r; const t = (r = e == null ? void 0 : e.regions) == null ? void 0 : r.find((c) => c.type === "capital"); return (t == null ? void 0 : t.value) ?? ""; }, p = (e) => { switch (e) { case o.EU: return "capital.legalSubtitleEU"; default: return null; } }, a = (e) => { switch (e) { case o.AU: return "capital.legalSubtitleAU"; case o.GB: return "capital.legalSubtitleGB"; case o.US: return "capital.legalSubtitleUS"; case o.CA: return "capital.legalSubtitleCA"; default: return null; } }, d = (e) => { const t = u(e), r = e == null ? void 0 : e.countryCode; return a(r) ?? p(t); }, S = (e) => { const t = u(e), r = (e == null ? void 0 : e.countryCode) ?? ""; return n.includes(r) || s.includes(t); }; export { d as getCapitalHeaderSubtitleByLegalEntity, S as isCapitalRegionSupported };