// All and only locales that will receive smartling translations and can be directly fed into <I18nProvider>
var SUPPORTED_LOCALES = ['de-DE', 'en-AU', 'en-CA', 'en-GB', 'en', 'es-ES', 'es', 'fr-CA', 'fr-FR', 'is-IS', 'ja-JP', 'pt-BR', 'th-TH', 'zh-SG'];
/*
  all locales that should directly use a different locale. Any other unsupported locale will fallback to 'en'
  this should match https://github.com/procore/procore/blob/d0515461046b8d018c8fa8ede1ca8b7aa2fcacf8/config/application.rb#L234C1-L240C7
  for any locales that are not listed in SUPPORTED_LOCALES
*/
var OVERWRITE_LOCALE_MAP = {
  'en-AE': 'en-GB',
  'en-SG': 'en-GB',
  'es-419': 'es'
};

/**
 * Returns the locale that should be used for the I18nProvider based on the environment locale
 * @param envLocale - the locale from the environment
 * @returns the locale that should be used for the I18nProvider
 */
export function getI18nProviderLocale(envLocale) {
  if (SUPPORTED_LOCALES.includes(envLocale)) {
    return envLocale;
  }
  if (OVERWRITE_LOCALE_MAP[envLocale]) {
    return OVERWRITE_LOCALE_MAP[envLocale];
  }
  return 'en';
}
//# sourceMappingURL=getI18nProviderLocale.js.map