import { Mindmap } from '..';
export type PersistenceError = {
    severity: string;
    message: string;
    errorType?: 'session-expired' | 'bad-request' | 'generic';
};
export type PersistenceErrorCallback = (error: PersistenceError) => void;
declare abstract class PersistenceManager {
    static _instance: PersistenceManager;
    private _errorHandlers;
    save(mindmap: Mindmap, editorProperties: any, saveHistory: boolean, events?: any): void;
    protected getCSRFToken(): string | null;
    load(mapId: string): Promise<Mindmap>;
    triggerError(error: PersistenceError): void;
    addErrorHandler(callback: PersistenceErrorCallback): void;
    removeErrorHandler(callback?: PersistenceErrorCallback): void;
    abstract discardChanges(mapId: string): void;
    abstract loadMapDom(mapId: string): Promise<Document>;
    abstract saveMapXml(mapId: string, mapXml: Document, pref?: any, saveHistory?: boolean, events?: any): any;
    abstract unlockMap(mapId: string): void;
    static init: (instance: PersistenceManager) => void;
    static getInstance(): PersistenceManager;
    static loadFromDom(mapId: string, mapDom: Document): Mindmap;
}
export default PersistenceManager;
