{"version":3,"file":"getFormatLocales.mjs","names":[],"sources":["../../../src/hooks/utils/getFormatLocales.ts"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\n\n// Pure helper shared by hook-based and RSC code paths. This module must stay\n// free of hook/context imports so it can be reached from the components-rsc\n// entrypoint.\n\nconst EMPTY_LOCALES_PROP: string[] = [];\n\nexport function getFormatLocales({\n  locale,\n  enableI18n,\n  localesProp = EMPTY_LOCALES_PROP,\n}: {\n  locale: string;\n  enableI18n: boolean;\n  localesProp?: string[];\n}): string[] {\n  const defaultLocale = getI18nConfig().getDefaultLocale();\n  const shouldTranslate =\n    enableI18n && getI18nConfig().requiresTranslation(locale);\n  return shouldTranslate\n    ? [...localesProp, locale, defaultLocale]\n    : [defaultLocale];\n}\n"],"mappings":"iDAMA,MAAM,EAA+B,EAAE,CAEvC,SAAgB,EAAiB,CAC/B,SACA,aACA,cAAc,GAKH,CACX,IAAM,EAAgB,GAAe,CAAC,kBAAkB,CAGxD,OADE,GAAc,GAAe,CAAC,oBAAoB,EAAO,CAEvD,CAAC,GAAG,EAAa,EAAQ,EAAc,CACvC,CAAC,EAAc"}