import Logger from './Logger';
import ModuleManager from './ModuleManager';
import { Deps } from '../protocol/typeUtil';
import { Commands } from '../protocol';
import { ModuleName, ModuleEventMap, EventParam, ModuleCmdMap, CmdInput, CmdOutput } from '../types/protocol';
import { LogType, Params } from '../types/log';
export default abstract class BaseModule<N extends ModuleName = ModuleName, E extends ModuleEventMap = {}, C extends ModuleCmdMap = any> {
    moduleName: N;
    protected execute: Commands<Deps<N>>;
    protected listeners: Map<keyof E, ((params: EventParam<E, keyof E, 'params'>) => void)[]>;
    protected logger: Logger<N>;
    constructor(moduleName: N);
    install(manager: ModuleManager): Promise<void>;
    protected created(): Promise<void> | void;
    protected registerEvents(manager: ModuleManager): void;
    addEventListener<N extends keyof E>(name: N, handler: (params: EventParam<E, N, 'params'>) => void): () => void;
    emit<N extends keyof E>(name: N, data: EventParam<E, N, 'params'>): void;
    exec<N extends keyof C>(name: N, ...params: CmdInput<N, C[N]>): CmdOutput<N, C[N]>;
    log: (type: LogType, ...params: Params<N>) => void;
}
