import { EventEmitter } from '@angular/core';
import { Task } from '../models/task';
import { ApiService, ApiResponse, IDGSChangeSet, IDGSEnvironment } from '@dotgov/core';
import { FVFormBuilderService } from './formBuilder.service';
/**
 * @Author [GrigoreMe](https://github.com/grigoreme)
 */
export declare class ProcessService extends FVFormBuilderService {
    private api;
    private environment;
    private onError;
    private loadingEmitter;
    private updateEmitter;
    private onChangeEmitter;
    constructor(api: ApiService, environment: IDGSEnvironment);
    /**
     * Reffers to API task start method.
     * @param path
     * @param payload
     * @param options
     */
    start(path?: string[], payload?: Object, options?: Object): Promise<any>;
    /**
     * Reffers to API task next method.
     * It doesnt do next at all. Its the hook must be after most of /start done to create task instance.
     * @param processId
     * @param options
     */
    next(processId: string, options?: Object): Promise<void | ApiResponse>;
    /**
     * Reffers to API 'task' method.
     * Kinda execute some sort of logic with process.
     * Most used to switch between process steps.
     * @param processId
     * @param taskId
     * @param payload
     * @param options
     */
    task(processId: string, taskId?: string, payload?: Object, options?: Object): Promise<void | ApiResponse>;
    /**
     * Extracts error from task response.
     */
    errorFromResponse(response: ApiResponse): any;
    /**
     * Updates loading status project-wide.
     */
    updateAllLoadings(status: boolean): void;
    /**
     * Get all controls cached for {taskId}.
     * @param taskId
     */
    getTaskCached(taskId: any): any;
    /**
     * Clears all cached controls for {taskId}.
     * @param taskId
     */
    clearTaskCached(taskId: any): void;
    /**
     * Cache {key} with {value} for {taskId}.
     * @param key
     * @param value
     * @param taskId
     */
    set(key: string, value: any, taskId?: string): void;
    /**
     * Update loading status for {processId}.
     * @param processId
     * @param status
     */
    setLoading(processId: string, status: boolean): void;
    readonly onAnyUpdate: EventEmitter<any>;
    readonly onAnyLoading: EventEmitter<any>;
    readonly onAnyError: EventEmitter<any>;
    readonly onChange: EventEmitter<any>;
    changes: IDGSChangeSet;
    activeTask: Task;
    user: any;
    private catch(processId, error);
}
