{"version":3,"file":"useI18n.mjs","names":["useI18nBase"],"sources":["../../../src/server/useI18n.ts"],"sourcesContent":["import type {\n  DictionaryKeys,\n  LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { useI18n as useI18nBase } from 'react-intlayer/server';\nimport { resolveAmbientLocale } from './ambientLocale';\n\n/**\n * On the server side, hook returning a `t(path)` function scoped to one\n * dictionary key, in the i18next / next-intl style.\n *\n * If the locale is not provided, it will use the locale from the server\n * context, falling back to the locale carried by the request.\n */\nexport const useI18n = <T extends DictionaryKeys>(\n  namespace: T,\n  locale?: LocalesValues\n): ReturnType<typeof useI18nBase<T>> =>\n  useI18nBase<T>(namespace, resolveAmbientLocale(locale));\n"],"mappings":";;;;;;;;;;;AAcA,MAAa,WACX,WACA,WAEAA,UAAe,WAAW,qBAAqB,MAAM,CAAC"}