import { type ReactNode } from 'react'; import { type LocalizedStringFormatter } from 'react-aria'; import { useLocale as useRACLocale } from 'react-aria-components'; import { type LocalizedMessages, type LocalizedString } from './messages/index.js'; /** Defines the shape of an object containing localized strings. */ export type Messages = Record>; /** A utility type that makes every property optional within an object containing localized strings. */ export type PartialMessages = { [P in keyof T]?: Partial; }; /** Contains information about the current locale. */ export type LocaleInfo = ReturnType; /** * Returns the current locale and layout direction. * * See [localization guide](https://ui.cimpress.io/dev-guides/localization/). */ export declare function useLocaleInfo(): LocaleInfo; /** * Creates type-safe tools for localizing custom components. * * See [localization guide](https://ui.cimpress.io/dev-guides/localization/). */ export declare function UNSTABLE_createLocalizationTools(): { /** * Provides localization data to Cimpress UI components. * * See [localization guide](https://ui.cimpress.io/dev-guides/localization/). */ LocalizationProvider: { ({ children, locale: newLocale, messages: newMessages, }: { /** The component tree that will be localized (usually the entire application). */ children: ReactNode; /** The locale to apply to the children. Should be a [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code. */ locale?: string; /** The localized messages for use by the components within this component tree. */ messages?: PartialMessages; }): import("react/jsx-runtime").JSX.Element; displayName: string; }; /** * Returns a localized message formatter for a specific component. * * See [localization guide](https://ui.cimpress.io/dev-guides/localization/). */ useLocalizedMessages: (key: R) => LocalizedStringFormatter; }; export declare const LocalizationProvider: { ({ children, locale: newLocale, messages: newMessages, }: { /** The component tree that will be localized (usually the entire application). */ children: ReactNode; /** The locale to apply to the children. Should be a [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code. */ locale?: string; /** The localized messages for use by the components within this component tree. */ messages?: PartialMessages | undefined; }): import("react/jsx-runtime").JSX.Element; displayName: string; }, useLocalizedMessages: (key: R) => LocalizedStringFormatter; //# sourceMappingURL=localization-provider.d.ts.map