import React from "react"; import { type LocaleCode, type LocaleMetadata, type LocaleMetadataMap, type LocalePreference, type LocalizationPreference } from "../localization/shared.js"; export { DEFAULT_LOCALE, LOCALE_HYDRATION_GLOBAL, LOCALE_METADATA, LOCALE_STORAGE_KEY, SUPPORTED_LOCALES, isLocaleCode, isValidLocaleCode, localeDirection, localeMetadataFor, type BuiltinLocaleCode, 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 type AgentNativeI18nLocaleLoader = () => Promise; 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; locales?: readonly LocaleMetadata[]; coreMessageOverrides?: Partial>; supportedLocales?: readonly LocaleCode[]; } export declare function createAgentNativeI18nCatalog(args: { messages: LocaleMessages; localeLoaders: Partial>; locales?: readonly LocaleMetadata[]; coreMessageOverrides?: Partial>; namespace?: string; sourceLocale?: LocaleCode; supportedLocales?: readonly LocaleCode[]; }): AgentNativeI18nCatalog & { messages: LocaleMessages; sourceLocale: LocaleCode; 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; localeMetadata: LocaleMetadataMap; setPreference: (preference: LocalePreference) => Promise; loading: boolean; supportedLocales: readonly LocaleCode[]; } declare global { var __AGENT_NATIVE_LOCALE_CONTEXT__: React.Context | undefined; interface Window { __AGENT_NATIVE_LOCALE__?: LocaleHydrationPayload; } } export declare function AgentNativeI18nProvider(props: 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 useIconPickerLabels(): { allCategories: string; loadError: string; saveError: string; uploadFailed: string; uploadTooLarge: string; uploadUnsupportedType: string; retry: string; uploadHint: string; colorNames: { [k: string]: string; }; categoryNames: { [k: string]: string; }; groupNames: { [k: string]: 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; };