import { ShowToast, ToastConfig } from '../model';
import { ErrorMonitor, Translate } from '../services';
import { PromisesSequence } from './PromisesSequence';
import { TypedEmitter } from '../util';
export interface ExecuteParams<R> {
    submit: () => Promise<R> | undefined;
    onEventuallyUpdated?: () => unknown;
}
export interface CollectionOptimisticSequenceExecutorParams {
    readonly showToast: ShowToast;
    readonly translate: Translate;
    readonly errorMonitor: ErrorMonitor;
    readonly onRollback: (err: unknown) => (Omit<ToastConfig, 'action'> & {
        action?: Partial<ToastConfig['action']>;
    }) | undefined;
}
export declare class CollectionOptimisticSequenceExecutor {
    readonly showToast: ShowToast;
    readonly translate: Translate;
    readonly errorMonitor: ErrorMonitor;
    readonly onRollback: (err: unknown) => (Omit<ToastConfig, "action"> & {
        action?: Partial<import("../model").ToastAction | undefined>;
    }) | undefined;
    readonly seq: PromisesSequence;
    removeToast: (() => void) | null;
    readonly events: TypedEmitter<{
        windowClosedDuringSequence: () => unknown;
    }>;
    constructor(params: CollectionOptimisticSequenceExecutorParams);
    removeAndShowToast(toastConfig: ToastConfig): void;
    sequence<R>(params: ExecuteParams<R>): Promise<void>;
}
//# sourceMappingURL=CollectionOptimisticSequenceExecutor.d.ts.map