/**
 * I18nService
 *
 * Internationalization service with hybrid loading strategy.
 * Manages translations, locale switching, and RTL/LTR direction.
 *
 * Features:
 * - Subscriber/listener pattern for reactive updates
 * - Hybrid loading: Bundle English, lazy-load other locales
 * - Interpolation: {variable} syntax
 * - Pluralization: ICU-style plural rules
 * - RTL detection: Automatic based on locale
 * - Fallback to English for missing keys
 *
 * Part of PIE Assessment Toolkit.
 */
import type { I18nConfig, I18nServiceApi, PluralTranslation, TranslationBundle } from "@pie-players/pie-players-shared/i18n";
export type { I18nConfig, I18nServiceApi, PluralTranslation, TranslationBundle, };
/**
 * I18nService
 *
 * Manages internationalization with reactive state updates.
 */
export declare class I18nService implements I18nServiceApi {
    private locale;
    private fallbackLocale;
    private direction;
    private translations;
    private listeners;
    private loadingPromises;
    private config;
    constructor(config?: I18nConfig);
    /**
     * Initialize i18n with locale and loading strategy
     */
    initialize(config: I18nConfig): Promise<void>;
    /**
     * Translate a key with optional interpolation
     *
     * @param key Translation key (e.g., 'common.save')
     * @param params Optional parameters for interpolation
     * @returns Translated string
     */
    t(key: string, params?: Record<string, any>): string;
    /**
     * Translate with pluralization
     *
     * @param key Translation key
     * @param count Count for pluralization
     * @param params Optional parameters for interpolation
     * @returns Translated string with plural form
     */
    tn(key: string, count: number, params?: Record<string, any>): string;
    /**
     * Get current locale
     */
    getLocale(): string;
    /**
     * Change locale (triggers async loading if needed)
     *
     * @param locale Locale code (e.g., 'en', 'es', 'zh', 'ar')
     */
    setLocale(locale: string): Promise<void>;
    /**
     * Get current text direction
     */
    getDirection(): "ltr" | "rtl";
    /**
     * Get available locales
     */
    getAvailableLocales(): string[];
    /**
     * Check if locale is loaded
     */
    isLocaleLoaded(locale: string): boolean;
    /**
     * Subscribe to locale/translation changes
     * Returns unsubscribe function
     */
    subscribe(listener: () => void): () => void;
    /**
     * Check if a translation key exists
     */
    hasKey(key: string): boolean;
    /**
     * Notify all listeners of state change
     */
    private notifyListeners;
    /**
     * Apply locale and notify listeners
     */
    private applyLocale;
    /**
     * Apply direction to DOM
     */
    private applyDOMDirection;
    /**
     * Load translations for a locale
     */
    private loadTranslationsForLocale;
    /**
     * Get translation for a key
     */
    private getTranslation;
    /**
     * Interpolate variables in translation string
     * Replaces {variable} with params.variable
     */
    private interpolate;
    /**
     * Select plural form based on count and locale
     * Simplified implementation - real implementation would use Intl.PluralRules
     */
    private selectPluralForm;
    /**
     * Detect browser locale
     */
    private detectBrowserLocale;
}
