import { IUiResources } from "UiResources";
/**
 * Repo-neutral component to load localizable strings defined in ./resources.json file.
 */
export declare class ResourceLoader {
    static instance: ResourceLoader;
    private language;
    private oneFilePerLanguage;
    private resources;
    private loadedPromise;
    private loadedPromiseResolver;
    private loadedPromiseRejector;
    private constructor();
    /**
     * Inject strings as resources so that the tests can cut the dependency to the localization.
     * @param resources Mock data of the localizable strings
     */
    static inject(resources?: object): void;
    /**
     * @param options preventLoading: True if this needs to be called from the unit test. False otherwise.
     * @param options oneFilePerLanguage: True if each language has its own Javascript file for each language set up. False otherwise.
     * Be in sync with the option in the resource loader plugin initialization.
     * @param options languageNotFoundCallback: Function that is executed when the current user language is not found in the resource file.
     * @param options languageOverride: BCP47 language name to load the resources for. Browser default language is used if not specified.
     */
    initialize(options: {
        preventLoading?: boolean;
        oneFilePerLanguage?: boolean;
        languageNotFoundCallback?: (bcp47Name: string) => void;
        languageOverride?: string;
    }): void;
    /** Get the JSON that contains the localized strings for the browser UI language.
     * The returned JSON could include empty string if the resource string is too new or the unit test does not mock all the localizable strings.
     */
    getAsync(): Promise<IUiResources>;
    get(): IUiResources;
    private languageNotFoundCallback;
    private getFallbackLanguage;
    private startLoading;
    private onReadyStateChange;
    private onLoaded;
    private onLoadError;
    private ensureEmptyStringOnLackingResource;
}
