import BaseModule from '../../common/Module';
import { ModuleName } from '../../protocol';
import { CmdEnum, EventMap } from '../../protocol/preview';
import { Progress, GadgetPlatform, GadgetPCMode } from '../../types/upload';
import { PreviewGadgetOptions, PreviewH5Options, PreviewBlockOptions } from '../../types/preview';
export default abstract class PreviewModule extends BaseModule<ModuleName.preview, EventMap> {
    constructor();
    protected abstract displayQRCode(url: string): Promise<void>;
    protected abstract onProgress(data: Progress): void;
    abstract [CmdEnum.previewBlock](options: PreviewBlockOptions): Promise<void>;
    abstract openExternal(url: string): void;
    protected choosePCMode(defaultPCMode?: string): Promise<GadgetPCMode>;
    protected emitProgress(data: Progress): void;
    protected genQcodePage(src: string): string;
    protected getGadgetFormData(options: {
        platform: GadgetPlatform;
        mode: GadgetPCMode | void;
        packagePath: string;
        miniMode: number;
        startPage: string;
        enableWebviewSafeDomain: boolean;
        unneedMsg?: boolean;
        debug_info?: {
            user_id: string;
            tenant_id: string;
        };
    }): {};
    protected updateLastPreviewTime(compilePath: string, params: {
        url?: string;
        watch?: boolean;
        platform?: GadgetPlatform;
    }): void;
    protected showQRCodeUrl(url: any): void;
    [CmdEnum.previewGadget](options: PreviewGadgetOptions): Promise<{
        schemaUrl: string;
        warnMsgs: string[];
    } | void>;
    [CmdEnum.previewGadgetPlugin](options: PreviewGadgetOptions): Promise<any>;
    [CmdEnum.previewH5](options: PreviewH5Options): Promise<{
        url?: string;
    }>;
}
