{"version":3,"file":"ssg.mjs","names":[],"sources":["../../src/errors/ssg.ts"],"sourcesContent":["import { createGtNextDiagnostic } from './diagnostics';\n\n// ========== WARNINGS ========== //\n\n// This was (1) triggered by SSG without running middleware, or (2) triggered by a request with no locale headers (also no middleware).\nexport const noLocalesCouldBeDeterminedWarning = createGtNextDiagnostic({\n  whatHappened: 'No locale could be determined for this request',\n  wayOut: 'gt-next will fall back to the default locale',\n  fix: 'If you use SSG, configure locale resolution',\n  docsUrl:\n    'https://generaltranslation.com/docs/react/nextjs/app-router-static-site-generation#no-locale-could-be-determined',\n});\n\nexport const withGTStaticPropsLocaleRoutingError = createGtNextDiagnostic({\n  severity: 'Error',\n  whatHappened:\n    'withGTStaticProps() could not determine the statically generated locale',\n  why: 'without Pages Router locale routing, Next.js generates only one version of this page',\n  fix: 'Add i18n locales and defaultLocale to your Next.js configuration',\n});\n\nexport const createMissingPagesRouterLocaleWarning = (fallbackLocale: string) =>\n  createGtNextDiagnostic({\n    severity: 'Warning',\n    whatHappened: 'Next.js did not provide an active Pages Router locale',\n    why: 'the locale is normally available when internationalized routing is configured',\n    wayOut: `The locale \"${fallbackLocale}\" will be used for this request`,\n    fix: 'Add i18n locales and defaultLocale to your Next.js configuration',\n  });\n"],"mappings":";;AAKA,MAAa,oCAAoC,uBAAuB;CACtE,cAAc;CACd,QAAQ;CACR,KAAK;CACL,SACE;CACH,CAAC;AAEF,MAAa,sCAAsC,uBAAuB;CACxE,UAAU;CACV,cACE;CACF,KAAK;CACL,KAAK;CACN,CAAC;AAEF,MAAa,yCAAyC,mBACpD,uBAAuB;CACrB,UAAU;CACV,cAAc;CACd,KAAK;CACL,QAAQ,eAAe,eAAe;CACtC,KAAK;CACN,CAAC"}