import { ModuleDesc, ModuleName, ModuleEventMap, ModuleCmdMap, CmdFun } from '../types/protocol';
import { GadgetPlatform, GadgetPCMode } from '../types/upload';
import { AppTypeEnum } from '../types/commonData';
export declare enum EventEnum {
    PerformanceInit = "performanceInit",
    PerformanceWaiting = "performanceWaiting",
    PerformanceConnecting = "performanceConnecting",
    PerformanceRunning = "performanceRunning",
    PerformanceEnd = "performanceEnd",
    PerformanceClose = "performanceClose",
    PerformanceVersionInvalid = "performanceVersionInvalid",
    PerformanceError = "performanceError"
}
export declare enum CmdEnum {
    Start = "Performance.start",
    Stop = "Performance.stop",
    GetPage = "Performance.getPage"
}
export interface EventMap extends ModuleEventMap<EventEnum> {
    PerformanceInit: {
        type: '';
        params: {
            platform?: GadgetPlatform;
        };
    };
    PerformanceWaiting: {
        type: '';
        params: {
            mobileDebugUrl?: string;
            host?: string;
            platform?: GadgetPlatform;
        };
    };
    PerformanceConnecting: {
        type: '';
        params: {
            platform?: GadgetPlatform;
        };
    };
    PerformanceRunning: {
        type: '';
        params: {
            platform?: GadgetPlatform;
        };
    };
    PerformanceEnd: {
        type: '';
        params: {
            platform?: GadgetPlatform;
            data: any;
        };
    };
    PerformanceClose: {
        type: '';
        params: {
            platform?: GadgetPlatform;
            data?: any;
        };
    };
    PerformanceVersionInvalid: {
        type: '';
        params: {
            platform?: GadgetPlatform;
        };
    };
    PerformanceError: {
        type: '';
        params: {
            platform?: GadgetPlatform;
            error: string[];
        };
    };
}
type CmdStart = (m: ModuleName.performance, cmd: CmdEnum.Start, opts: {
    compilePath: string;
    mode: GadgetPCMode;
    platform: GadgetPlatform;
    appType: AppTypeEnum;
    traceId?: string;
    startPage?: string;
}) => Promise<void>;
type CmdStop = (m: ModuleName.performance, cmd: CmdEnum.Stop, opts: {}) => void;
type CmdGetPage = (m: ModuleName.performance, cmd: CmdEnum.GetPage, opts: {}) => Promise<string>;
export type Command = CmdStart & CmdStop & CmdGetPage;
export interface CmdMap extends ModuleCmdMap<CmdEnum> {
    [CmdEnum.Start]: CmdFun<CmdStart>;
    [CmdEnum.Stop]: CmdFun<CmdStop>;
    [CmdEnum.GetPage]: CmdFun<CmdGetPage>;
}
export declare const PerformanceDesc: ModuleDesc<EventMap, CmdMap, ModuleName.compile | ModuleName.storage | ModuleName.ui | ModuleName.service | ModuleName.eventTracker | ModuleName.preview | ModuleName.jssdk>;
export {};
