{"version":3,"file":"index.client.mjs","names":[],"sources":["../src/index.client.ts"],"sourcesContent":["'use client';\n\nimport { initializeGTClient } from './setup/initGT.client';\ninitializeGTClient();\n\nimport type {\n  GetServerSideProps,\n  GetServerSidePropsContext,\n  PreviewData,\n} from 'next';\nimport type { ParsedUrlQuery } from 'querystring';\nimport type { WithGTServerSideProps } from './pages-dir/withGTServerSideProps';\nimport type {\n  WithGTStaticProps,\n  WithGTStaticPropsFunction,\n} from './pages-dir/withGTStaticProps';\nimport { createWithGTStaticPropsClientError } from './errors/client';\n\n// ===== Unsupported Server APIs ===== //\nexport function parseLocale<\n  Params extends ParsedUrlQuery = ParsedUrlQuery,\n  Preview extends PreviewData = PreviewData,\n>(_: GetServerSidePropsContext<Params, Preview>): string {\n  throw new Error(\n    'parseLocale() is only available from gt-next on the server.'\n  );\n}\n\nexport function withGTServerSideProps<\n  Props extends Record<string, unknown> = Record<string, unknown>,\n  Params extends ParsedUrlQuery = ParsedUrlQuery,\n  Preview extends PreviewData = PreviewData,\n>(\n  _?: GetServerSideProps<Props, Params, Preview>\n): GetServerSideProps<WithGTServerSideProps<Props>, Params, Preview> {\n  throw new Error(\n    'withGTServerSideProps() is only available from gt-next on the server.'\n  );\n}\n\nexport const withGTStaticProps: WithGTStaticPropsFunction = () => {\n  throw new Error(createWithGTStaticPropsClientError());\n};\n\n// ===== Components ===== //\nexport {\n  Branch,\n  Currency,\n  DateTime,\n  Derive,\n  GTProvider,\n  GtInternalTranslateJsx,\n  GtInternalVar,\n  LocaleSelector,\n  Num,\n  Plural,\n  RegionSelector,\n  RelativeTime,\n  T,\n  Var,\n} from 'gt-react';\n\n// ===== Hooks ===== //\nexport {\n  useDefaultLocale,\n  useGT,\n  useLocale,\n  useLocaleDirection,\n  useLocaleProperties,\n  useLocales,\n  useLocaleSelector,\n  useMessages,\n  useRegion,\n  useSetLocale,\n  useTranslations,\n} from 'gt-react';\n\n// ===== Functions ===== //\nexport {\n  decodeMsg,\n  decodeOptions,\n  decodeVars,\n  declareVar,\n  derive,\n  getDefaultLocale,\n  getLocaleProperties,\n  getLocales,\n  resolveCanonicalLocale,\n  getTranslationsSnapshot,\n  getVersionId,\n  gtFallback,\n  mFallback,\n  msg,\n} from 'gt-react';\nexport { useLocalizeHref } from './link/useLocalizeHref';\nexport { isLocaleSupported } from './request/localeValidation';\n\n// ===== Types ===== //\nexport type { GTTranslationOptions, RuntimeTranslationOptions } from 'gt-react';\nexport type { WithGTServerSideProps, WithGTStaticProps };\n"],"mappings":";;;;;;;AAGA,oBAAoB;AAgBpB,SAAgB,YAGd,GAAuD;AACvD,OAAM,IAAI,MACR,8DACD;;AAGH,SAAgB,sBAKd,GACmE;AACnE,OAAM,IAAI,MACR,wEACD;;AAGH,MAAa,0BAAqD;AAChE,OAAM,IAAI,MAAM,oCAAoC,CAAC"}