import { LocalesValues, ProviderVariant } from "@intlayer/types/module_augmentation"; import { FC, PropsWithChildren } from "react"; type IntlayerValue = { locale: LocalesValues; setLocale: (newLocale: LocalesValues) => void; /** * Ambient variant applied to every dictionary read below the provider, the * same way `locale` is. Overridden per call by an explicit selector. */ variant?: ProviderVariant; disableEditor?: boolean; isCookieEnabled?: boolean; }; /** * Context that stores the current locale on the client side. */ export declare const IntlayerClientContext: import("react").Context; /** * Hook that provides the current Intlayer client context. * * @returns The current Intlayer context values. */ export declare const useIntlayerContext: () => {}; /** * Props for the IntlayerProvider component. */ export type IntlayerProviderProps = PropsWithChildren<{ /** * The locale to use. If not provided, it will be detected from storage or configuration. */ locale?: LocalesValues; /** * Ambient variant applied to every dictionary read below this provider — for * a dimension that is fixed for the whole session (tenant, school type, plan * tier…) and that therefore no component should have to pass by hand. * * Accepts three forms: * - `variant="school1"` — one named variant for every key * - `variant={['school1', 'default']}` — an ordered preference chain: the * first variant the key actually declares wins * - `variant={{ key1: 'school1', key2: ['school1', 'default'], default: 'base' }}` * — per dictionary key, with `default` covering every key not listed * * A plain object is always read as the per-key map. To pin a structured * variant globally, nest it: `variant={{ default: { id: 'prod_abc' } }}`. * * A call-site selector always wins: `useIntlayer('key', { variant: 'x' })` * replaces this default rather than extending it. */ variant?: ProviderVariant; /** * The default locale to use as a fallback. */ defaultLocale?: LocalesValues; /** * Function to set the locale. */ setLocale?: (locale: LocalesValues) => void; /** * Whether to disable the editor. */ disableEditor?: boolean; /** * Whether to enable cookies for storing the locale. */ isCookieEnabled?: boolean; }>; /** * Provider that stores the current locale on the client side. * * This component is focused on content delivery without the editor features. * * @param props - The provider props. * @returns The provider component. */ export declare const IntlayerProviderContent: FC; /** * Main provider for Intlayer in React applications. * * It includes the editor provider by default, allowing for live content editing * if configured. * * @param props - The provider props. * @returns The provider component with editor support. * * @example * ```tsx * import { IntlayerProvider } from 'react-intlayer'; * * const App = () => ( * * * * ); * ``` */ export declare const IntlayerProvider: FC; export {}; //# sourceMappingURL=IntlayerProvider.d.ts.map