import { ModuleDesc, ModuleName, ModuleEventMap, ModuleCmdMap, CmdFun } from '../types/protocol';
import { StartOptions } from '../types/devtools';
import { Request } from '../types/auto';
import { BlockEnvData, BlockStartData } from '../types/block';
import { AppType } from '../types/commonData';
export declare enum EventEnum {
    sendMessage = "Devtools.sendMessage"
}
export interface EventMap extends ModuleEventMap<EventEnum> {
    [EventEnum.sendMessage]: {
        type: '';
        params: object;
    };
}
export declare enum CmdEnum {
    start = "Devtools.start",
    cutConnect = "Devtools.cutConnect",
    startBlock = "Devtools.startBlock",
    blockInitInfo = "Devtools.blockInitInfo",
    setTrack = "Devtools.setTrack",
    stopAudit = "Devtools.stopAudit",
    sendCDPMessage = "Devtools.sendCDPMessage",
    startWSServer = "Devtools.startWSServer",
    startH5DevtoolServer = "Devtools.startH5DevtoolsServer",
    setWatch = "Devtools.setWatch",
    useNewCompiler = "Devtools.useNewCompiler",
    refresh = "Devtools.refresh",
    reConnect = "Devtools.reConnect",
    refreshDom = "Devtools.refreshDom"
}
type CmdStart = (m: ModuleName.devtools, cmd: CmdEnum.start, opt: StartOptions) => Promise<void>;
type CmdCutConnect = (m: ModuleName.devtools, cmd: CmdEnum.cutConnect) => void;
type CmdBlockStart = (m: ModuleName.devtools, cmd: CmdEnum.startBlock, opt: {
    compilePath: string;
    appType?: AppType;
}) => Promise<BlockStartData>;
type CmdBlockInitInfo = (m: ModuleName.devtools, cmd: CmdEnum.blockInitInfo, compilePath?: string) => BlockEnvData;
type CmdSetTrack = (m: ModuleName.devtools, cmd: CmdEnum.setTrack, opt: {
    track: (...params: any[]) => void;
}) => void;
type CmdStopAudit = (m: ModuleName.devtools, cmd: CmdEnum.stopAudit, opt: {
    outputPath: string;
    outputType: ('json' | 'html')[];
    reqData: Request;
}) => void;
type CmdSendCDPMessage = (m: ModuleName.devtools, cmd: CmdEnum.sendCDPMessage, opt: {
    method: string;
    params?: any;
}, to: 'devtools' | 'view') => void;
type CmdStartH5DevtoolServer = (m: ModuleName.devtools, cmd: CmdEnum.startH5DevtoolServer) => Promise<{
    url: string;
}>;
type CmdSetWatch = (m: ModuleName.devtools, cmd: CmdEnum.setWatch, watch: boolean) => void;
type CmdUseNewCompiler = (m: ModuleName.devtools, cmd: CmdEnum.useNewCompiler) => void;
type CmdRefresh = (m: ModuleName.devtools, cmd: CmdEnum.refresh) => Promise<void>;
type CmdReConnect = (m: ModuleName.devtools, cmd: CmdEnum.reConnect) => Promise<void>;
type CmdRefreshDom = (m: ModuleName.devtools, cmd: CmdEnum.refreshDom) => void;
export type Command = CmdStart & CmdCutConnect & CmdBlockStart & CmdSetTrack & CmdStopAudit & CmdSendCDPMessage & CmdBlockInitInfo & CmdStartH5DevtoolServer & CmdSetWatch & CmdUseNewCompiler & CmdRefresh & CmdReConnect & CmdRefreshDom;
export interface CmdMap extends ModuleCmdMap<CmdEnum> {
    [CmdEnum.start]: CmdFun<CmdStart>;
    [CmdEnum.cutConnect]: CmdFun<CmdCutConnect>;
    [CmdEnum.startBlock]: CmdFun<CmdBlockStart>;
    [CmdEnum.blockInitInfo]: CmdFun<CmdBlockInitInfo>;
    [CmdEnum.setTrack]: CmdFun<CmdSetTrack>;
    [CmdEnum.stopAudit]: CmdFun<CmdStopAudit>;
    [CmdEnum.sendCDPMessage]: CmdFun<CmdSendCDPMessage>;
    [CmdEnum.startH5DevtoolServer]: CmdFun<CmdStartH5DevtoolServer>;
    [CmdEnum.setWatch]: CmdFun<CmdSetWatch>;
    [CmdEnum.useNewCompiler]: CmdFun<CmdUseNewCompiler>;
    [CmdEnum.refresh]: CmdFun<CmdRefresh>;
    [CmdEnum.reConnect]: CmdFun<CmdReConnect>;
    [CmdEnum.refreshDom]: CmdFun<CmdRefreshDom>;
}
export declare const DevtoolsDesc: ModuleDesc<EventMap, CmdMap, ModuleName.simulator | ModuleName.storage | ModuleName.account | ModuleName.ui | ModuleName.eventTracker | ModuleName.compile | ModuleName.service | ModuleName.sniffer | ModuleName.debugger | ModuleName.performance>;
export {};
