import { Group, Scene } from "spritejs";
import { EToolsKey } from "../enum";
import { MasterControlForWorker } from "../mainEngine";
import { IActiveToolsDataType, IBatchMainMessage, ICameraOpt, IWorkerMessage } from "../types";
import { IMainThreadInitOption } from "./base";
import { BaseShapeOptions, BaseShapeTool } from "../tools/base";
import { ShapeOptions } from "../tools/utils";
interface MainThreadWorkerManager {
    master: MasterControlForWorker;
    mainThreadWorkerMap: Map<string, MainThreadWorkerImpl>;
    createMainThreadWorker(viewId: string, opt: IMainThreadInitOption): MainThreadWorkerImpl;
    consume(msg: Set<IWorkerMessage>): void;
    post(sp: Omit<IBatchMainMessage, 'render'>): void;
    clearDrawCount(viewId: string): void;
    notifyDrawCount(viewId: string): void;
    active(): void;
    destroy(): void;
    updateCamera(): void;
}
export declare class MainThreadWorkerManagerImpl implements MainThreadWorkerManager {
    master: MasterControlForWorker;
    mainThreadWorkerMap: Map<string, MainThreadWorkerImpl>;
    constructor(master: MasterControlForWorker);
    updateCamera(): void;
    notifyDrawCount(viewId: string): void;
    clearDrawCount(viewId: string): void;
    createMainThreadWorker(viewId: string, opt: IMainThreadInitOption): MainThreadWorkerImpl;
    consume(msg: Set<IWorkerMessage>): void;
    post(msg: Omit<IBatchMainMessage, 'render'>): void;
    destroy(): void;
    active(): void;
}
interface MainThreadWorker {
    readonly viewId: string;
    readonly subLocalLayer: Group;
    readonly manager: MainThreadWorkerManager;
    setCameraOpt(cameraOpt: ICameraOpt): void;
    updateCamera(msg: IWorkerMessage): void;
    on(msg: IWorkerMessage): void;
    destroy(): void;
}
export declare class MainThreadWorkerImpl implements MainThreadWorker {
    viewId: string;
    opt: IMainThreadInitOption;
    manager: MainThreadWorkerManager;
    subLocalLayer: Group;
    subLocalWork: SubMainThreadWorkerImpl;
    protected scene: Scene;
    protected cameraOpt?: ICameraOpt;
    constructor(viewId: string, opt: IMainThreadInitOption, manager: MainThreadWorkerManager);
    private createScene;
    private createLayer;
    private updateScene;
    private updateLayer;
    updateDpr(dpr: number): void;
    on(msg: IWorkerMessage): void;
    setCameraOpt(cameraOpt: ICameraOpt): void;
    updateCamera(msg: IWorkerMessage): void;
    clearAll(): void;
    destroy(): void;
    clearDrawLayer(num: number): void;
}
interface SubMainThreadWorker {
    workShapes: Map<string, BaseShapeTool>;
    destroy(): void;
    clearAll(): void;
    getToolsOpt(): IActiveToolsDataType | undefined;
    setToolsOpt(opt: IActiveToolsDataType): void;
    canUseSubWorkerLayer(toolsType: EToolsKey): boolean;
    consumeDrawAll(data: IWorkerMessage): void;
    consumeDraw(data: IWorkerMessage): void;
    removeNode(data: IWorkerMessage): void;
    setWorkOptions(workId: string, opt: BaseShapeOptions): void;
}
export declare class SubMainThreadWorkerImpl implements SubMainThreadWorker {
    thread: MainThreadWorkerImpl;
    workShapes: Map<string, BaseShapeTool>;
    private tmpOpt?;
    private syncUnitTime;
    private subWorkerDrawCount;
    constructor(subThreadOpt: {
        thread: MainThreadWorkerImpl;
    });
    getToolsOpt(): IActiveToolsDataType | undefined;
    consumeDrawAll(data: IWorkerMessage): void;
    consumeDraw(data: IWorkerMessage): void;
    removeNode(data: IWorkerMessage): void;
    createLocalWork(data: IWorkerMessage): void;
    setWorkOptions(workId: string, opt: ShapeOptions): void;
    destroy(): void;
    clearAll(): void;
    canUseSubWorkerLayer(toolsType: EToolsKey): toolsType is EToolsKey.Pencil;
    setToolsOpt(opt: IActiveToolsDataType): void;
    createWorkShapeNode(opt: IActiveToolsDataType & {
        workId: string;
    }): import("../tools").ArrowShape | import("../tools").PencilShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").StarShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | import("../tools/text").TextShape | import("../tools").LaserPenShape | import("../tools").EraserShape | import("../tools/pencilEraser").PencilEraserShape | import("../tools").BitMapEraserShape | import("../tools").SelectorShape | import("../tools").ImageShape | undefined;
    clearWorkShapeNodeCache(workId: string): void;
    getWorkShape(workId: string): BaseShapeTool | undefined;
}
export {};
