{"version":3,"file":"useI18nStore.cjs","names":["useGTContext","getI18nStore"],"sources":["../../src/i18n-store/useI18nStore.ts"],"sourcesContent":["import { Dictionary, Hash, Locale } from 'gt-i18n/internal/types';\nimport { useGTContext } from '../context/context';\nimport { I18nStore } from './I18nStore';\nimport { getI18nStore } from './singleton-operations';\nimport { Translation } from 'gt-i18n/types';\n\nexport function useI18nStore(): I18nStore {\n  const context = useGTContext();\n  return context?.i18nStore || getI18nStore();\n}\n\nexport function useTranslationsSnapshot(): Record<\n  Locale,\n  Record<Hash, Translation>\n> {\n  const context = useGTContext();\n  return context?.translationsSnapshot || {};\n}\n\nexport function useDictionariesSnapshot(): Record<Locale, Dictionary> {\n  const context = useGTContext();\n  return context?.dictionariesSnapshot || {};\n}\n"],"mappings":"kFAMA,SAAgB,GAA0B,CAExC,OADgBA,EAAAA,cACF,EAAE,WAAaC,EAAAA,cAAc,CAG7C,SAAgB,GAGd,CAEA,OADgBD,EAAAA,cACF,EAAE,sBAAwB,EAAE,CAG5C,SAAgB,GAAsD,CAEpE,OADgBA,EAAAA,cACF,EAAE,sBAAwB,EAAE"}