import BaseModule from '../../common/Module';
import { CmdEnum, EventMap, CmdMap, CmdGetP, CmdGet, CmdInitProject as CmdInit, CmdGetA, CmdInitApp, CmdGetUserConfig, CmdSetUserConfig } from '../../protocol/storage';
import { ModuleName, CmdParam, CmdReturn } from '../../types/protocol';
import { AppType } from '../../types/commonData';
import { StorageStruct, GlobalStorage, AppMap, UserStorageData } from '../../types/storage';
type RootKey = Exclude<keyof StorageStruct, 'projects'>;
export default abstract class BaseStorageModule extends BaseModule<ModuleName.storage, EventMap> implements CmdMap {
    protected data: StorageStruct;
    constructor();
    protected init(): void;
    protected registerEvents(): void;
    abstract get<K extends keyof GlobalStorage>(key: K): GlobalStorage[K] | void;
    abstract set<K extends keyof GlobalStorage>(key: K, data: GlobalStorage[K] | void): void;
    abstract getRootPath(): string;
    [CmdEnum.Set]<R extends RootKey, A extends AppType, N extends keyof AppMap[A]>(compilePath: string | R, appType: A | N | StorageStruct[R], key?: N | AppMap[A][N], data?: AppMap[A][N]): void;
    [CmdEnum.Get](...params: CmdParam<CmdGet>): CmdReturn<CmdGet>;
    [CmdEnum.Get](...params: CmdParam<CmdGetP>): CmdReturn<CmdGetP>;
    [CmdEnum.Get](...params: CmdParam<CmdGetA>): CmdReturn<CmdGetA>;
    [CmdEnum.GetUserConfig](userid: string): CmdReturn<CmdGetUserConfig>;
    [CmdEnum.GetFromDisk]<T extends keyof GlobalStorage>(key: T): GlobalStorage[T] | string;
    [CmdEnum.SetUserConfig](userid: string, data: UserStorageData): CmdReturn<CmdSetUserConfig>;
    [CmdEnum.InitProject](...params: CmdParam<CmdInitApp>): CmdReturn<CmdInitApp>;
    [CmdEnum.InitProject](...params: CmdParam<CmdInit>): CmdReturn<CmdInit>;
    [CmdEnum.DeleteCompilePath](compilePaths: string[], appType: AppType): Promise<string[]>;
}
export {};
