import { EnvironmentInjector } from '@angular/core';
import { ConfigLoadOptions, ConfigService } from '@rxap/config';
import { Environment } from '@rxap/environment';
import { NGXLogger } from 'ngx-logger';
/**
 * @param ...args Arbitrary arguments
 */
export type ApplicationBeforeFunction<Config extends object> = (config: ConfigService, options: Config) => any | Promise<any>;
/**
 * The common interface of ApplicationRef and ModuleRef
 */
export interface RefWithInjector {
    readonly injector: EnvironmentInjector;
}
export type ApplicationAfterFunction<Ref extends RefWithInjector> = (app: Ref, config: ConfigService, logger: NGXLogger) => any | Promise<any>;
export declare abstract class Application<Config extends object, Ref extends RefWithInjector> {
    readonly environment: Environment;
    readonly options: Config;
    readonly configLoadOptions?: ConfigLoadOptions | undefined;
    app: Ref | null;
    logger: NGXLogger | null;
    config: ConfigService | null;
    private _beforeList;
    private _afterList;
    constructor(environment: Environment, options?: Config, configLoadOptions?: ConfigLoadOptions | undefined);
    bootstrap(): Promise<void>;
    before(fnc: ApplicationBeforeFunction<Config>): void;
    after(fnc: ApplicationAfterFunction<Ref>): void;
    protected handleBefore(config: ConfigService, options: Config): Promise<void>;
    protected handleAfter(app: Ref, logger: NGXLogger, config: ConfigService): Promise<void>;
    protected loadConfig(environment: Environment): Promise<void>;
    protected prepareEnvironment(environment: Environment): Promise<void>;
    protected abstract prepareConfig(config: Config): void;
    protected abstract create(): Promise<Ref>;
}
