import { Configs } from '../Configs';
import React from 'react';
import { BlueBase } from '../BlueBase';
export declare type IntlMessages = {
    [key: string]: string;
};
/**
 * Props of the `IntlProvider` component.
 */
export interface IntlProviderProps {
    children: React.ReactNode;
}
export interface IntlProviderState {
    readonly direction: Configs['direction'];
    readonly rtl: boolean;
    readonly locale: string;
    readonly loading: boolean;
    readonly messages: IntlMessages;
    readonly error?: any;
}
/**
 * Interface of object passed as param to the IntlConsumer render prop method.
 */
export interface IntlContextData {
    __: (message: string) => string;
    changeLocale: (slug: string) => void;
    changeDirection: (direction: Configs['direction']) => void;
    direction: Configs['direction'];
    locale: string;
    messages: IntlMessages;
    rtl: boolean;
}
/**
 * This is the context where BlueBase theme is stored.
 */
export declare const IntlContext: React.Context<IntlContextData>;
/**
 * BlueBase theme consumer.
 */
export declare const IntlConsumer: React.ExoticComponent<React.ConsumerProps<IntlContextData>>;
/**
 * 🈯️ IntlProvider
 */
export declare class IntlProvider extends React.Component<IntlProviderProps, IntlProviderState> {
    static contextType: React.Context<BlueBase>;
    readonly state: IntlProviderState;
    /** Stores configuration subscription ID */
    private localeSubscriptionId?;
    private directionSubscriptionId?;
    constructor(props: IntlProviderProps);
    componentWillMount(): Promise<void>;
    componentWillUnmount(): void;
    /**
     * Sets a theme to Provider's state. If a theme key is given, it is used,
     * otherwise global theme is used.
     *
     * @param slug
     * @param BB
     */
    setLocale(locale: string, BB: BlueBase): Promise<void>;
    /**
     * Sets a theme to Provider's state. If a theme key is given, it is used,
     * otherwise global theme is used.
     *
     * @param slug
     * @param BB
     */
    setDirection(BB: BlueBase): void;
    __(message: string): string;
    render(): JSX.Element;
    /**
     * Subscribe to locale config updates
     * @param BB
     */
    private subscribeLocale;
    /**
     * Unsubscribe from locale config updates
     * @param BB
     */
    private unsubscribeLocale;
    /**
     * Subscribe to direction config updates
     * @param BB
     */
    private subscribeDirection;
    /**
     * Unsubscribe from direction config updates
     * @param BB
     */
    private unsubscribeDirection;
}
