import { ServerContext } from "./serverContext.js"; import { LocalesValues, ProviderVariant } from "@intlayer/types/module_augmentation"; import { FC, PropsWithChildren } from "react"; /** * Context that store the current locale on the server side */ export declare const IntlayerServerContext: ServerContext; /** * Context that stores the ambient variant on the server side. * * Kept separate from {@link IntlayerServerContext} so the locale context keeps * its plain `LocalesValues` shape for the packages already reading it. */ export declare const IntlayerServerVariantContext: ServerContext; /** * Hook that provides the current locale */ export declare const useIntlayer: () => LocalesValues; /** * Get the current locale */ export declare const locale: LocalesValues; /** * Seeds the request-scoped server context locale imperatively — the equivalent * of mounting {@link IntlayerServerProvider} without wrapping the tree. * * Useful in pages that must stay statically rendered while no ambient * request-derived locale source is static-safe (Next.js < 16): * * ```tsx * const Page = async ({ params }) => { * const { locale } = await params; * setLocale(locale); * return ; * }; * ``` */ export declare const setLocale: (locale: LocalesValues) => void; /** * Seeds the request-scoped ambient variant imperatively — the equivalent of * the `variant` prop of {@link IntlayerServerProvider} without wrapping the * tree. See that prop for the accepted shapes. */ export declare const setVariant: (variant: ProviderVariant) => void; export type IntlayerServerProviderProps = PropsWithChildren & { locale?: LocalesValues; /** * Ambient variant applied to every dictionary read below this provider — for * a dimension resolved once per request (tenant, school type, plan tier…). * * Accepts a name (`'school1'`), an ordered preference chain * (`['school1', 'default']`), or a per-key map * (`{ key1: 'school1', default: 'base' }`). A call-site selector wins. */ variant?: ProviderVariant; }; /** * Provider that store the current locale on the server side */ export declare const IntlayerServerProvider: FC; //# sourceMappingURL=IntlayerServerProvider.d.ts.map