import { TranslationStringsObject } from "@matrix-org/react-sdk-module-api/lib/types/translations";
import { AnyLifecycle } from "@matrix-org/react-sdk-module-api/lib/lifecycles/types";
import { ProvideCryptoSetupExtensions } from "@matrix-org/react-sdk-module-api/lib/lifecycles/CryptoSetupExtensions";
import { ProvideExperimentalExtensions } from "@matrix-org/react-sdk-module-api/lib/lifecycles/ExperimentalExtensions";
import { AppModule } from "./AppModule";
import { ModuleFactory } from "./ModuleFactory";
import "./ModuleComponents";
/**
 * Handles and manages extensions provided by modules.
 */
declare class ExtensionsManager {
    private cryptoSetupExtension;
    private experimentalExtension;
    /** `true` if `cryptoSetupExtension` is the default implementation; `false` if it is implemented by a module. */
    private hasDefaultCryptoSetupExtension;
    /** `true` if `experimentalExtension` is the default implementation; `false` if it is implemented by a module. */
    private hasDefaultExperimentalExtension;
    /**
     * Create a new instance.
     */
    constructor();
    /**
     * Provides a crypto setup extension.
     *
     * @returns The registered extension. If no module provides this extension, a default implementation is returned.
     */
    get cryptoSetup(): ProvideCryptoSetupExtensions;
    /**
     * Provides an experimental extension.
     *
     * @remarks
     * This method extension is provided to simplify experimentation and development, and is not intended for production code.
     *
     * @returns The registered extension. If no module provides this extension, a default implementation is returned.
     */
    get experimental(): ProvideExperimentalExtensions;
    /**
     * Add any extensions provided by the module.
     *
     * @param module - The appModule to check for extensions.
     *
     * @throws if an extension is provided by more than one module.
     */
    addExtensions(module: AppModule): void;
}
/**
 * Handles and coordinates the operation of modules.
 */
export declare class ModuleRunner {
    static readonly instance: ModuleRunner;
    private extensionsManager;
    private modules;
    private constructor();
    /**
     * Exposes all extensions which may be overridden/provided by modules.
     *
     * @returns An `ExtensionsManager` which exposes the extensions.
     */
    get extensions(): ExtensionsManager;
    /**
     * Resets the runner, clearing all known modules, and all extensions
     *
     * Intended for test usage only.
     */
    reset(): void;
    /**
     * All custom translations from all registered modules.
     */
    get allTranslations(): TranslationStringsObject;
    /**
     * Registers a factory which creates a module for later loading. The factory
     * will be called immediately.
     * @param factory The module factory.
     */
    registerModule(factory: ModuleFactory): void;
    /**
     * Invokes a lifecycle event, notifying registered modules.
     * @param lifecycleEvent The lifecycle event.
     * @param args The arguments for the lifecycle event.
     */
    invoke(lifecycleEvent: AnyLifecycle, ...args: any[]): void;
}
export {};
