import { Observable, Subject } from 'rxjs';
import { MetadataStateManager } from '../../interfaces';
import * as i0 from "@angular/core";
/**
 * Service used for managing state of metadata
 */
export declare class MetadataHistoryManager<TMetadata = any> {
    protected metadataState: MetadataStateManager<TMetadata>;
    /**
     * Current index which is active currently
     */
    protected activeIndex: number | null;
    /**
     * Index of state which is saved
     */
    protected saveIndex: number | null;
    /**
     * All stored states
     */
    protected states: string[];
    /**
     * Indication whether is manager enabled
     */
    protected enabled: boolean;
    /**
     * Used for emitting pop event
     */
    protected popSubject: Subject<TMetadata>;
    /**
     * Used for emitting history change event
     */
    protected historyChangeSubject: Subject<void>;
    /**
     * Information whether user can undo
     */
    get canUndo(): boolean;
    /**
     * Information whether user can redo
     */
    get canRedo(): boolean;
    /**
     * Indication whether current state is saved state
     */
    get saved(): boolean;
    /**
     * Occurs when user pops new state, using undo, or redo
     */
    get pop(): Observable<TMetadata>;
    /**
     * Occurs when new state appears in history
     */
    get historyChange(): Observable<void>;
    /**
     * Current state of metadata
     */
    get state(): TMetadata | null;
    constructor(metadataState: MetadataStateManager<TMetadata>);
    /**
     * Undo last change in metadata
     */
    undo(): void;
    /**
     * Redo last change in metadata
     */
    redo(): void;
    /**
     * Indicates that new change in state has been done and should be retrieved
     */
    getNewState(): void;
    /**
     * Sets current state as saved state
     */
    save(): void;
    setInitialState(metadata: TMetadata): void;
    /**
     * Cleans history of metadata states
     */
    clean(): void;
    /**
     * Enable metadata history manager, changes in metadata are stored
     */
    enable(): void;
    /**
     * Disables metadata history manager, changes in metadata history are not stored
     */
    disable(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<MetadataHistoryManager<any>, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<MetadataHistoryManager<any>>;
}
//# sourceMappingURL=metadataHistoryManager.service.d.ts.map