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
};
