import React from "react"; import { type LocaleCode, type LocaleMetadata, type LocalePreference, type LocalizationPreference } from "../localization/shared.js"; export { DEFAULT_LOCALE, LOCALE_HYDRATION_GLOBAL, LOCALE_METADATA, LOCALE_STORAGE_KEY, SUPPORTED_LOCALES, localeDirection, normalizeLocaleCode, normalizeLocalePreference, normalizeLocalizationPreference, resolveLocaleFromCandidates, resolveLocaleFromPreference, type LocaleCode, type LocaleMetadata, type LocalePreference, type LocalizationPreference, } from "../localization/shared.js"; export { getLocaleInitScript } from "../localization/server.js"; export type LocaleMessages = Record; export interface LocaleHydrationPayload { locale?: LocaleCode; preference?: LocalizationPreference; dir?: "ltr" | "rtl"; messages?: LocaleMessages; } export interface AgentNativeI18nCatalog { namespace?: string; sourceLocale?: LocaleCode; messages?: LocaleMessages; loadMessages?: (locale: LocaleCode) => Promise; } export interface AgentNativeI18nProviderProps { children: React.ReactNode; catalog?: AgentNativeI18nCatalog; initialLocale?: LocaleCode; initialPreference?: LocalizationPreference | LocalePreference; initialMessages?: LocaleMessages | null; persistPreference?: boolean; } interface LocaleContextValue { locale: LocaleCode; sourceLocale: LocaleCode; preference: LocalePreference; dir: "ltr" | "rtl"; metadata: LocaleMetadata; setPreference: (preference: LocalePreference) => Promise; loading: boolean; } declare global { var __AGENT_NATIVE_LOCALE_CONTEXT__: React.Context | undefined; interface Window { __AGENT_NATIVE_LOCALE__?: LocaleHydrationPayload; } } export declare function AgentNativeI18nProvider({ children, catalog, initialLocale, initialPreference, initialMessages, persistPreference, }: AgentNativeI18nProviderProps): React.JSX.Element; export declare function useLocale(): LocaleContextValue; export declare function useOptionalLocale(): LocaleContextValue | null; export declare function useT(): (key: string, options?: Record) => string; export declare function useFormatters(): { formatDate(value: Date | number | string, options?: Intl.DateTimeFormatOptions): string; formatNumber(value: number, options?: Intl.NumberFormatOptions): string; formatRelativeTime(value: number, unit: Intl.RelativeTimeFormatUnit, options?: Intl.RelativeTimeFormatOptions): string; formatList(value: string[], options?: Intl.ListFormatOptions): string; }; export declare function LanguagePicker({ className, includeSystem, label, variant, }: { className?: string; includeSystem?: boolean; label?: string; variant?: "select" | "icon" | "ghost-icon"; }): React.JSX.Element; //# sourceMappingURL=i18n.d.ts.map