{"version":3,"file":"condition-store.mjs","names":["getReadonlyConditionStore"],"sources":["../../src/hooks/condition-store.ts"],"sourcesContent":["import { getReadonlyConditionStore } from '../condition-store/singleton-operations';\nimport { useGTContext } from '../context/context';\n\n/**\n * Returns the current locale.\n */\nexport function useLocale(): string {\n  const context = useGTContext();\n  return context ? context.locale : getReadonlyConditionStore().getLocale();\n}\n\n/**\n * Returns the current region, or undefined if no region is set.\n */\nexport function useRegion(): string | undefined {\n  const context = useGTContext();\n  return context ? context.region : getReadonlyConditionStore().getRegion();\n}\n\n/**\n * Returns the current enableI18n flag.\n */\nexport function useEnableI18n(): boolean {\n  const context = useGTContext();\n  return context\n    ? context.enableI18n\n    : getReadonlyConditionStore().getEnableI18n();\n}\n\nexport function useSetLocale(): (locale: string) => void {\n  const context = useGTContext();\n  return context ? context.setLocale : getReadonlyConditionStore().setLocale;\n}\n\nexport function useSetRegion(): (region: string | undefined) => void {\n  const context = useGTContext();\n  return context ? context.setRegion : getReadonlyConditionStore().setRegion;\n}\n\nexport function useSetEnableI18n(): (enabled: boolean) => void {\n  const context = useGTContext();\n  return context\n    ? context.setEnableI18n\n    : getReadonlyConditionStore().setEnableI18n;\n}\n"],"mappings":"sIAMA,SAAgB,GAAoB,CAClC,IAAM,EAAU,GAAc,CAC9B,OAAO,EAAU,EAAQ,OAASA,GAA2B,CAAC,WAAW,CAM3E,SAAgB,GAAgC,CAC9C,IAAM,EAAU,GAAc,CAC9B,OAAO,EAAU,EAAQ,OAASA,GAA2B,CAAC,WAAW,CAM3E,SAAgB,GAAyB,CACvC,IAAM,EAAU,GAAc,CAC9B,OAAO,EACH,EAAQ,WACRA,GAA2B,CAAC,eAAe,CAGjD,SAAgB,GAAyC,CACvD,IAAM,EAAU,GAAc,CAC9B,OAAO,EAAU,EAAQ,UAAYA,GAA2B,CAAC,UAGnE,SAAgB,GAAqD,CACnE,IAAM,EAAU,GAAc,CAC9B,OAAO,EAAU,EAAQ,UAAYA,GAA2B,CAAC,UAGnE,SAAgB,GAA+C,CAC7D,IAAM,EAAU,GAAc,CAC9B,OAAO,EACH,EAAQ,cACRA,GAA2B,CAAC"}