import { LocalesValues } from "@intlayer/types/module_augmentation"; import { Locale } from "@intlayer/types/allLocales"; //#region src/server/ambientLocale.d.ts /** * Fallback locale for the synchronous server hooks, so a page does not need a * provider of its own. Not a React hook despite suspending — it holds no * positional state, which is what lets it run conditionally (see * {@link createSuspendingReader}): on a client-side navigation that re-renders only the * page segment, the layout — and with it `IntlayerProvider` — does not re-run, * and the locale carried by the request takes over. * * On a context miss, first suspends once so a concurrently rendering provider * can seed the context, then suspends until the request storage resolves. * Returns `undefined` when the call site or the server context already carries * the locale. */ export declare const resolveFallbackLocale: (localeOrSelector?: unknown) => Locale | undefined; /** * Asynchronous twin of {@link resolveFallbackLocale}, for the hooks that are * already async and can await the request storage instead of suspending on it. */ export declare const getFallbackLocale: (localeOrSelector?: unknown) => Promise; /** * Full ambient locale for the server APIs that take a plain locale argument * (or none at all): call site → server context → locale carried by the * request. * * {@link resolveFallbackLocale} only yields the last rung, because the base hooks * in `react-intlayer/server` consult the first two themselves. The APIs * reimplemented here have no such fallback slot, so they need the resolved * value. */ export declare const resolveAmbientLocale: (locale?: LocalesValues) => LocalesValues | undefined; /** * Lets the asynchronous core reads resolve to the request locale. Idempotent; * a no-op in the browser, where `next/headers` is unavailable. */ export declare const registerRequestLocaleResolver: () => void; //#endregion //# sourceMappingURL=ambientLocale.d.ts.map