import { IActiveToolsDataType, IWorkerMessage, IMainMessage, IUpdateSelectorPropsType, IBatchMainMessage } from "../types";
import type { BaseShapeTool, BaseShapeOptions, SelectorShape, ImageShape, ShapeToolsClass } from "../tools";
import { MainThreadEngineImpl, ISubThreadInitOption } from "./base";
import { VNodeManager } from "../vNodeManager";
import { EToolsKey } from "../enum";
import { SubServiceThread } from "./subServiceThread";
import { TextShape } from "../tools/text";
import type { BitMapEraserShape } from "../tools/pencilEraserBitMap";
import type { PencilEraserShape } from "../tools/pencilEraser";
export interface SubLocalThread {
    readonly vNodes: VNodeManager;
    readonly thread: MainThreadEngineImpl;
    workShapes: Map<string, BaseShapeTool>;
    effectSelectNodeData: Set<IWorkerMessage>;
    destroy(): void;
    clearAll(): void;
    clearWorkShapeNodeCache(workId: string): void;
    setToolsOpt(opt: IActiveToolsDataType): void;
    getToolsOpt(): IActiveToolsDataType | undefined;
    createWorkShapeNode(opt: IActiveToolsDataType & {
        workId: string;
    }): void;
    setWorkOptions(workId: string, opt: BaseShapeOptions): void;
    consumeDrawAll(data: IWorkerMessage, serviceWork: SubServiceThread): void;
    consumeDraw(data: IWorkerMessage, serviceWork: SubServiceThread): void;
    colloctEffectSelectWork(data: IWorkerMessage): Promise<IWorkerMessage | undefined>;
    hasSelector(): boolean;
    getSelector(): SelectorShape | undefined;
    reRenderSelector(willSyncService?: boolean): void;
    blurSelector(data?: IWorkerMessage): Promise<void>;
    getWorkShape(workId: string): BaseShapeTool | undefined;
    getWorkShapes(): Map<string, BaseShapeTool>;
    setFullWork(data: Pick<IWorkerMessage, "workId" | "opt" | "toolsType">): ShapeToolsClass | undefined;
    consumeFull(data: IWorkerMessage): Promise<void>;
    removeWork(data: IWorkerMessage): void;
    removeSelector(data: IWorkerMessage): Promise<void>;
    updateFullSelectWork(data: IWorkerMessage): void;
    cursorHover(msg: IWorkerMessage): void;
    cursorBlur(): void;
    checkTextActive(data: IWorkerMessage): Promise<void>;
    removeNode(key: string): void;
    updateSelector(params: IUpdateSelectorPropsType & {
        callback?: (props: {
            res?: IMainMessage;
            param: IUpdateSelectorPropsType;
            postData: Pick<IBatchMainMessage, "sp" | "render">;
            workShapeNode: SelectorShape;
            newServiceStore: Map<string, {
                opt: BaseShapeOptions;
                toolsType: EToolsKey;
                ops?: string;
            }>;
            smoothSync?: boolean;
        }) => void;
    }): Promise<IMainMessage | undefined>;
    createLocalWork(data: IWorkerMessage): void;
}
export declare class SubLocalMainThreadImpl implements SubLocalThread {
    readonly vNodes: VNodeManager;
    readonly thread: MainThreadEngineImpl;
    workShapes: Map<string, BaseShapeTool>;
    effectSelectNodeData: Set<IWorkerMessage>;
    private batchEraserRemoveNodes;
    private batchEraserWorks;
    private tmpOpt?;
    private syncUnitTime;
    private fullWorkerDrawCount;
    private drawWorkActiveId?;
    private consumeCount;
    private combineTimerId?;
    private combineDrawResolve?;
    private combineDrawActiveId?;
    constructor(opt: ISubThreadInitOption);
    loadImageBitMap(msg: Pick<IWorkerMessage, "toolsType" | "opt" | "workId">): Promise<ImageBitmap | undefined>;
    createLocalWork(data: IWorkerMessage): void;
    updateSelector(params: IUpdateSelectorPropsType & {
        callback?: ((props: {
            res?: IMainMessage | undefined;
            param: IUpdateSelectorPropsType;
            postData: Pick<IBatchMainMessage, "sp">;
            workShapeNode: SelectorShape;
            newServiceStore: Map<string, {
                opt: BaseShapeOptions;
                toolsType: EToolsKey;
                ops?: string | undefined;
            }>;
            smoothSync?: boolean;
        }) => void) | undefined;
    }): Promise<IMainMessage | undefined>;
    destroy(): void;
    clearAll(): void;
    checkTextActive(data: IWorkerMessage): Promise<void>;
    cursorHover(msg: IWorkerMessage): void;
    cursorBlur(): void;
    updateFullSelectWork(data: IWorkerMessage): void;
    removeSelector(data: IWorkerMessage): Promise<void>;
    removeWork(data: IWorkerMessage): void;
    removeNode(key: string): void;
    setFullWork(data: Pick<IWorkerMessage, "workId" | "opt" | "toolsType">): BaseShapeTool | undefined;
    consumeFull(data: IWorkerMessage): Promise<void>;
    colloctEffectSelectWork(data: IWorkerMessage): Promise<IWorkerMessage | undefined>;
    private runEffectSelectWork;
    hasSelector(): boolean;
    getSelector(): SelectorShape;
    reRenderSelector(willSyncService?: boolean): Promise<void> | undefined;
    blurSelector(data?: IWorkerMessage): Promise<void>;
    clearWorkShapeNodeCache(workId: string): void;
    private drawBitMapEraserFull;
    private drawPencilEraserFull;
    private drawEraser;
    getWorkShape(workId: string): BaseShapeTool | undefined;
    getWorkShapes(): Map<string, BaseShapeTool>;
    consumeDraw(data: IWorkerMessage, serviceWork: SubServiceThread): void;
    private drawEraserCombine;
    consumeDrawAll(data: IWorkerMessage, serviceWork: SubServiceThread): void;
    getToolsOpt(): IActiveToolsDataType | undefined;
    setToolsOpt(opt: IActiveToolsDataType): void;
    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 | TextShape | import("../tools").LaserPenShape | import("../tools").EraserShape | PencilEraserShape | BitMapEraserShape | SelectorShape | ImageShape | import("../tools/shadowSvg").ISvgShadowShape | undefined;
}
