import { FeatureTypes, GraphElement } from '@csnext/cs-data';
import { DocDatasource, IGraphStorage, StorageTypes } from '../..';
export declare class RecentEntry {
    name?: string;
    handle?: any;
}
export declare class KGStorage {
    kg?: GraphElement[];
    featureTypes?: FeatureTypes;
}
export declare class DeviceStorage implements IGraphStorage {
    static DATA_MODEL_FILE: string;
    static DATA_GRAPH_FILE: string;
    source: DocDatasource;
    storageType: StorageTypes;
    directoryHandle?: any;
    files: {
        [name: string]: any;
    };
    dbPermission: boolean;
    private storage?;
    databaseHandle?: any | null;
    static get recentId(): string;
    static recentDatabases(): Promise<RecentEntry[]>;
    constructor();
    static saveRecentDatabases(db: RecentEntry[]): Promise<void>;
    init(source: DocDatasource): Promise<boolean>;
    private verifyPermission;
    loadGraph(): Promise<boolean>;
    private getJsonFromHandle;
    private getJsonContent;
    loadTypes(): Promise<boolean>;
    private saveDatabaseDebounce;
    static getStorage(source: DocDatasource): KGStorage | undefined;
    private saveDatabase;
    saveTypes(): Promise<boolean>;
    saveEdge(edge: GraphElement): Promise<GraphElement | undefined>;
    saveElement(element: GraphElement): Promise<GraphElement>;
    removeElement(id: string): Promise<boolean>;
    removeEdge(id: string): Promise<boolean>;
}
