import * as react_jsx_runtime from 'react/jsx-runtime';
import { ReactNode } from 'react';

type TranslateFn = ((key: string, params?: Record<string, unknown>) => string) & {
    /** Return the raw (unparsed) value at a given key — useful for arrays/objects in messages */
    raw: (key: string) => unknown;
};
interface I18nContextValue {
    translate: (namespace?: string) => TranslateFn;
    locale: string;
    messages?: Record<string, unknown>;
}
type I18nProviderProps = {
    children: ReactNode;
    value: I18nContextValue;
};
declare function I18nProvider({ children, value }: I18nProviderProps): react_jsx_runtime.JSX.Element;
declare function useTranslations(namespace?: string): TranslateFn;
declare function useLocale(): string;
type I18nFormatter = {
    dateTime: (date: Date, options?: Intl.DateTimeFormatOptions) => string;
    relativeTime: (date: Date, options?: Intl.RelativeTimeFormatOptions) => string;
    number: (value: number, options?: Intl.NumberFormatOptions) => string;
};
declare function useFormatter(): I18nFormatter;
/**
 * Create an I18nContextValue from a flat messages object and locale.
 * Messages should be a nested object where keys are namespaces
 * and values are objects of translation key → ICU message string.
 *
 * This performs simple string interpolation with {param} placeholders.
 * For full ICU MessageFormat (plurals, select, etc.), use intl-messageformat.
 */
declare function createI18nFromMessages(locale: string, messages: Record<string, unknown>): I18nContextValue;

export { type I18nContextValue, type I18nFormatter, I18nProvider, type I18nProviderProps, createI18nFromMessages, useFormatter, useLocale, useTranslations };
