import { Group } from "spritejs";
import { BaseShapeOptions } from "../tools";
import { ISubWorkerInitOption } from "./base";
import { VNodeManager } from "../vNodeManager";
import { IActiveToolsDataType, IBatchMainMessage, ILocalWorkItem, IServiceWorkItem, IWorkerMessage } from "../types";
import { EToolsKey } from "../enum";
import { WorkThreadEngineForSubWorker } from "./workerManager";
export interface TopLayerWork {
    readonly viewId: string;
    readonly vNodes: VNodeManager;
    readonly topLayer: Group;
    readonly post: (msg: IBatchMainMessage) => Promise<void>;
    consumeDraw(data: IWorkerMessage): void;
    consumeDrawAll(data: IWorkerMessage): void;
    destroy(): void;
}
export declare class TopLayerWorkForSubWorker implements TopLayerWork {
    viewId: string;
    vNodes: VNodeManager;
    topLayer: Group;
    readonly thread: WorkThreadEngineForSubWorker;
    post: (msg: IBatchMainMessage) => Promise<void>;
    serviceWorkShapes: Map<string, IServiceWorkItem>;
    localWorkShapes: Map<string, ILocalWorkItem>;
    protected tmpOpt?: IActiveToolsDataType;
    private syncUnitTime;
    protected animationId?: number | undefined;
    constructor(opt: ISubWorkerInitOption);
    canUseTopLayer(toolsType: EToolsKey): toolsType is EToolsKey.LaserPen;
    getWorkShape(workId: string): ILocalWorkItem | undefined;
    createWorkShape(workId: string, opt?: BaseShapeOptions): 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;
    setWorkOptions(workId: string, opt: BaseShapeOptions): 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;
    clearAllWorkShapesCache(): void;
    setToolsOpt(opt: IActiveToolsDataType): void;
    getToolsOpt(): IActiveToolsDataType | undefined;
    consumeDraw(data: IWorkerMessage): void;
    consumeDrawAll(data: IWorkerMessage): void;
    destroy(): void;
    private setNodeKey;
    private activeServiceWorkShape;
    private computNextAnimationIndex;
    private animationDraw;
    private runAnimation;
}
