{"version":3,"file":"_Tx.mjs","names":["Core_Tx"],"sources":["../../../src/server-dir/runtime/_Tx.tsx"],"sourcesContent":["import React from 'react';\nimport { TxProps } from '../../utils/types';\nimport { Tx as Core_Tx } from 'gt-react';\nimport { getRequestConditions } from '../../request/getRequestConditions';\n\n/**\n * Runtime translation component that renders its children in the user's given locale.\n *\n * @example\n * ```jsx\n * // Basic usage:\n * <Tx>\n *  Hello, {name}!\n * </Tx>\n * ```\n *\n * @example\n * ```jsx\n * // With a context:\n * <Tx context=\"greeting\">\n *  Hello, {name}!\n * </Tx>\n * ```\n *\n * @param {string} [context] - A context for the translation.\n * @param {string} [locale] - The locale to use for the translation.\n * @returns {Promise<React.ReactNode>} The translated content.\n */\nexport async function Tx({\n  locale,\n  ...props\n}: TxProps): Promise<React.ReactNode> {\n  const { _locale, _enableI18n } = await getRequestConditions();\n  return (\n    <Core_Tx {...props} _locale={locale || _locale} _enableI18n={_enableI18n} />\n  );\n}\n/** @internal _gtt - The GT transformation for the component. */\nTx._gtt = 'translate-runtime';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,eAAsB,GAAG,EACvB,QACA,GAAG,SACiC;CACpC,MAAM,EAAE,SAAS,gBAAgB,MAAM,sBAAsB;AAC7D,QACE,oBAACA,MAAD;EAAS,GAAI;EAAO,SAAS,UAAU;EAAsB;EAAe,CAAA;;;AAIhF,GAAG,OAAO"}