import type { IDeferred } from 'angular';
import type { IModalServiceInstance } from 'angular-ui-bootstrap';
import { Subject } from 'rxjs';
import type { Application } from '../../application/application.model';
import type { ITask } from '../../domain';
export interface ITaskMonitorConfig {
    title: string;
    application?: Application;
    modalInstance?: IModalServiceInstance;
    onTaskComplete?: () => any;
    onTaskRetry?: () => void;
    monitorInterval?: number;
    submitMethod?: () => PromiseLike<ITask>;
}
export interface IModalServiceInstanceEmulation<T = any> extends IModalServiceInstance {
    deferred: IDeferred<T>;
}
export declare class TaskMonitor {
    config: ITaskMonitorConfig;
    submitting: boolean;
    task: ITask;
    error: boolean;
    errorMessage: string;
    title: string;
    application: Application;
    submitMethod: (params?: any) => PromiseLike<ITask>;
    modalInstance: IModalServiceInstance;
    private monitorInterval;
    private onTaskComplete;
    onTaskRetry: () => void;
    statusUpdatedStream: Subject<void>;
    /** Use this factory in React Modal classes to emulate an AngularJS UI-Bootstrap modalInstance */
    static modalInstanceEmulation<T = any>(onClose: (result: T) => void, onDismiss?: (result: T) => void): IModalServiceInstanceEmulation;
    constructor(config: ITaskMonitorConfig);
    onModalClose(): void;
    closeModal: (evt?: React.MouseEvent<any>) => void;
    startSubmit(): void;
    setError(task?: ITask): void;
    private handleTaskComplete;
    handleTaskSuccess(task: ITask): void;
    tryToFix: () => void;
    submit: (submitMethod?: () => PromiseLike<ITask>) => void;
    callPreconfiguredSubmit(params: any): void;
}
