{"version":3,"file":"withGTConfigProps.mjs","names":[],"sources":["../../../src/config-dir/props/withGTConfigProps.ts"],"sourcesContent":["import type { MiddlewareConfig } from '../../middleware-dir/types';\n\nexport type HeadersAndCookies = {\n  localeHeaderName?: string;\n  localeCookieName?: string;\n  enableI18nCookieName?: string;\n  referrerLocaleCookieName?: string;\n  localeRoutingEnabledCookieName?: string;\n  resetLocaleCookieName?: string;\n};\n\nexport type CompilerOptions = {\n  /**\n   * Which compiler plugin to use: babel, swc, or none\n   * @default 'none'\n   */\n  type: 'babel' | 'swc' | 'none';\n  /**\n   * Log level for the compiler plugin.\n   * @default 'warn'\n   */\n  logLevel?: 'silent' | 'error' | 'warn' | 'info' | 'debug';\n  /**\n   * Whether to compile the translations at build time.\n   * @default true\n   */\n  compileTimeHash?: boolean;\n  /**\n   * Whether to disable build checks.\n   * @default false\n   */\n  disableBuildChecks?: boolean;\n  /**\n   * Whether to automatically wrap translatable JSX.\n   * @default false\n   */\n  enableAutoJsxInjection?: boolean;\n};\n\nexport type RenderMethod = 'skeleton' | 'replace' | 'default';\n\nexport const REQUEST_FUNCTION_TO_CONFIG_KEY = {\n  getLocale: 'getLocalePath',\n  getRegion: 'getRegionPath',\n} as const;\n\n// Middleware options are defaults for createNextMiddleware(), passed via env.\nexport type BaseWithGTConfigProps = MiddlewareConfig & {\n  // Additional top-level keys are forwarded as runtime translation metadata.\n  [key: string]: unknown;\n  // Request scoped filepath\n  dictionary?: string;\n  config?: string;\n  loadTranslationsPath?: string;\n  loadDictionaryPath?: string;\n  // Cloud integration. Credentials are read from environment variables.\n  runtimeUrl?: string | null;\n  cacheUrl?: string | null;\n  cacheExpiryTime?: number;\n  // Locale info\n  locales?: string[];\n  defaultLocale?: string;\n  ignoreBrowserLocales?: boolean;\n  disableInvalidLocaleWarning?: boolean;\n  /** Regular expression source that limits i18n middleware routing by pathname, written for paths without the locale prefix. `<Link>`, `useLocalizeHref()` and `getLocalizeHref()` leave non-matching paths unprefixed. */\n  pathRegex?: string;\n  // Rendering\n  renderSettings?: {\n    method: RenderMethod;\n    timeout?: number;\n  };\n  // Batching config\n  maxConcurrentRequests?: number;\n  maxBatchSize?: number;\n  batchInterval?: number; // ms\n  // Translation assistance\n  description?: string;\n  // ESLint integration\n  eslint?: boolean; // Enable/disable ESLint config generation (default: true)\n  eslintSeverity?: 'error' | 'warn'; // Severity level for ESLint rules (default: 'warn')\n  overwriteESLintConfig?: boolean; // Allow overwriting existing eslint.config.mjs (default: false)\n  // Other\n  experimentalCompilerOptions?: CompilerOptions;\n  headersAndCookies?: HeadersAndCookies;\n  _usingPlugin?: boolean;\n  /**\n   * Opt-in id-tagging (off by default): exposes each `<T>`'s translation hash as\n   * a `data-_gt-hash` attribute for tooling (localized replay, in-context QA).\n   * Must be the literal `true` to enable — see `isIdTaggingEnabled`. ⚠️ Enabling\n   * injects a `display:contents` `<span>` around any `<T>` that renders bare text\n   * or a fragment (elements are annotated in place, no wrapper).\n   */\n  _tagIds?: boolean;\n  // Request function paths\n  getLocalePath?: string;\n  getRegionPath?: string;\n};\n\nexport type withGTConfigProps = BaseWithGTConfigProps & {\n  /** Use GT_API_KEY instead. */\n  apiKey?: never;\n  /** Use GT_API_KEY instead. */\n  devApiKey?: never;\n  /** Use GT_PROJECT_ID instead. */\n  projectId?: never;\n};\n"],"mappings":";AAyCA,MAAa,iCAAiC;CAC5C,WAAW;CACX,WAAW;CACZ"}