/**
 * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
 *
 * @author David Sehnal <david.sehnal@gmail.com>
 * @author Alexander Rose <alexander.rose@weirdbyte.de>
 */
import { List } from 'immutable';
import { UUID } from '../../mol-util';
import { PluginState } from '../../mol-plugin/state';
import { StatefulPluginComponent } from '../component';
import { PluginContext } from '../../mol-plugin/context';
export { PluginStateSnapshotManager };
declare class PluginStateSnapshotManager extends StatefulPluginComponent<{
    current?: UUID | undefined;
    entries: List<PluginStateSnapshotManager.Entry>;
    isPlaying: boolean;
    nextSnapshotDelayInMs: number;
}> {
    private plugin;
    static DefaultNextSnapshotDelayInMs: number;
    private entryMap;
    readonly events: {
        changed: import("rxjs").Subject<unknown>;
    };
    getIndex(e: PluginStateSnapshotManager.Entry): number;
    getEntry(id: string | undefined): PluginStateSnapshotManager.Entry | undefined;
    remove(id: string): void;
    add(e: PluginStateSnapshotManager.Entry): void;
    replace(id: string, snapshot: PluginState.Snapshot): void;
    move(id: string, dir: -1 | 1): void;
    clear(): void;
    setCurrent(id: string): PluginState.Snapshot | undefined;
    getNextId(id: string | undefined, dir: -1 | 1): UUID | undefined;
    setStateSnapshot(snapshot: PluginStateSnapshotManager.StateSnapshot): Promise<PluginState.Snapshot | undefined>;
    private syncCurrent;
    getStateSnapshot(options?: {
        name?: string;
        description?: string;
        playOnLoad?: boolean;
        params?: PluginState.SnapshotParams;
    }): PluginStateSnapshotManager.StateSnapshot;
    serialize(options?: {
        type: 'json' | 'molj' | 'zip' | 'molx';
        params?: PluginState.SnapshotParams;
    }): Promise<Blob>;
    open(file: File): Promise<PluginState.Snapshot | undefined>;
    private timeoutHandle;
    private next;
    play(delayFirst?: boolean): void;
    stop(): void;
    togglePlay(): void;
    constructor(plugin: PluginContext);
}
declare namespace PluginStateSnapshotManager {
    interface Entry {
        timestamp: number;
        name?: string;
        description?: string;
        snapshot: PluginState.Snapshot;
    }
    function Entry(snapshot: PluginState.Snapshot, params: {
        name?: string;
        description?: string;
    }): Entry;
    function isStateSnapshot(x?: any): x is StateSnapshot;
    interface StateSnapshot {
        timestamp: number;
        version: string;
        name?: string;
        description?: string;
        current: UUID | undefined;
        playback: {
            isPlaying: boolean;
            nextSnapshotDelayInMs: number;
        };
        entries: Entry[];
    }
}
