import * as react from 'react';
import { ReactNode } from 'react';
import { I18n } from '@platform-modules/i18n';

declare class I18nProviderError extends Error {
    constructor();
}
declare class DirectionProviderError extends Error {
    constructor();
}
declare function I18nProvider({ i18n, locale, children, }: {
    i18n: I18n;
    locale: string;
    children: ReactNode;
}): react.JSX.Element;
declare function useLocale(): string;
declare function useT(ns?: string): (key: string, vars?: Record<string, string | number>) => string;
declare function useTranslations(): (key: string, vars?: Record<string, string | number>) => string;
declare function DirectionProvider({ children }: {
    children: ReactNode;
}): react.JSX.Element;
declare function useDirection(): 'rtl' | 'ltr';
interface LanguageSwitcherProps {
    locales: readonly string[];
    onChange: (locale: string) => void;
    /**
     * Escape hatch: render each option yourself. Receives `name` (the autonym), so you can
     * drop any per-app label map. `active` is whether this option is the current locale.
     */
    render?: (props: {
        locale: string;
        name: string;
        active: boolean;
        select: () => void;
    }) => ReactNode;
}
/**
 * Headless language switcher — renders the option controls only, **no landmark**.
 * Wrap it in your own `<nav aria-label="…">` (or another labeled container): the host owns
 * the landmark so it gets a unique, localized name. Emitting a landmark here would nest
 * inside yours, and multiple unlabeled navs on a page are a WCAG landmark failure.
 *
 * Default buttons are labeled by autonym (the language's name in its own language, via
 * `Intl.DisplayNames`), mark the active option with `aria-current`, and set `lang` per
 * option. Use {@link LanguageSwitcherProps.render} to supply your own option markup.
 */
declare function LanguageSwitcher({ locales, onChange, render }: LanguageSwitcherProps): react.JSX.Element;

export { DirectionProvider, DirectionProviderError, I18nProvider, I18nProviderError, LanguageSwitcher, type LanguageSwitcherProps, useDirection, useLocale, useT, useTranslations };
