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)

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