import type EventEmitter2 from "eventemitter2";
import { ICameraOpt, ILayerOptionType, IMainMessageRenderData, IOffscreenCanvasOptionType, ViewWorkerOptions } from "../core/types";
import { BaseSubWorkModuleProps, ApplianceManagerLike } from "./types";
import type { CameraState, View } from "./types";
import type { DebouncedFunc, DebouncedFuncLeading } from "lodash";
import { EToolsKey } from "../core/enum";
import { ShowFloatBarMsgValue } from "../displayer/types";
import { UndoRedoMethod } from "../undo";
import { BaseViewDisplayer } from "./displayerView";
export interface ViewInfo {
    id: string;
    focusScenePath: string;
    displayer: MainViewDisplayerManager | AppViewDisplayerManager;
    container?: HTMLDivElement;
    cameraOpt?: ICameraOpt;
    viewData?: View;
    [key: string]: any;
}
/** view容器管理器抽象 */
export declare abstract class ViewContainerManager {
    static defaultCameraOpt: Pick<ICameraOpt, "centerX" | "centerY" | "scale">;
    static defaultScreenCanvasOpt: Pick<IOffscreenCanvasOptionType, "autoRender" | "contextType">;
    static defaultLayerOpt: Pick<ILayerOptionType, "offscreen" | "handleEvent" | "depth">;
    internalMsgEmitter: EventEmitter2;
    control: ApplianceManagerLike;
    abstract focuedViewId?: string;
    abstract focuedView?: ViewInfo;
    mainView?: ViewInfo;
    appViews: Map<string, ViewInfo>;
    constructor(props: BaseSubWorkModuleProps);
    get worker(): import("../core/mainEngine").MasterControlForWorker;
    abstract getViewInitData(viewId: string): ViewWorkerOptions | undefined;
    getUndoTickerId(viewId: string): number | undefined;
    undoTickerStart: (id: number, viewId: string) => void;
    undoTickerEnd: (id: number, viewId: string) => void;
    addExcludeIds: (ids: string[], viewId: string) => void;
    undo(): number;
    redo(): number;
    protected validator(target: ViewInfo, key: string, value: any): void;
    abstract mountView(viewIde: string): Promise<void>;
    destroyAppView(viewId: string, justLocal?: boolean): void;
    createMianView(originMainView: ViewInfo): void;
    createAppView(originAppView: ViewInfo): void;
    isAppView(viewId: string): boolean;
    getView(viewId: string): ViewInfo | undefined;
    getCurScenePath(viewId: string): string | undefined;
    getAllViews(): (ViewInfo | undefined)[];
    setViewScenePath(viewId: string, scenePath: string): void;
    setViewData(viewId: string, viewData: View): void;
    setFocuedViewId(viewId: string): void;
    setViewFocusScenePath(viewId: string, scenePath: string): void;
    /** 销毁 */
    destroy(): void;
    setFocuedViewCameraOpt(cameraState: CameraState): void;
    /** view中心点坐标转换成页面原始坐标 */
    transformToOriginPoint(p: [number, number], viewId: string): [number, number];
    /** 页面坐标转换成view中心点坐标 */
    transformToScenePoint(p: [number, number], viewId: string): [number, number];
    /** 绘制view */
    render(renderData: IMainMessageRenderData[]): void;
    /** 是否绘制浮动选框 */
    showFloatBar(viewId: string, isShow: boolean, opt?: Partial<ShowFloatBarMsgValue>): void;
    /** 激活文字编辑器 */
    activeTextEditor(viewId: string): void;
    /** 不激活文字编辑器 */
    unActiveTextEditor(viewId: string): void;
    /** 是否显示浮动选框按钮 */
    showFloatBarBtn(viewId: string, isShow: boolean): void;
    /** 更新文字编辑器信息 */
    updateTextEditorInfo(viewId: string, activeTextId?: string): void;
    setActiveMiniMap(viewId: string, show?: boolean): void;
}
export declare abstract class BaseViewDisplayerManager {
    abstract dpr: number;
    abstract width: number;
    abstract height: number;
    readonly control: ApplianceManagerLike;
    readonly internalMsgEmitter: EventEmitter2;
    readonly commiter: UndoRedoMethod;
    abstract vDom?: BaseViewDisplayer;
    abstract eventTragetElement?: HTMLDivElement;
    abstract canvasContainerRef: React.RefObject<HTMLDivElement>;
    abstract subLocalCanvasContainerRef?: React.RefObject<HTMLDivElement>;
    abstract canvasTopRef?: React.RefObject<HTMLCanvasElement>;
    abstract canvasServiceFloatRef: React.RefObject<HTMLCanvasElement>;
    abstract canvasFloatRef: React.RefObject<HTMLCanvasElement>;
    abstract canvasBgRef: React.RefObject<HTMLCanvasElement>;
    abstract backgroundContainerRef: React.RefObject<HTMLDivElement>;
    abstract floatBarRef: React.RefObject<HTMLDivElement>;
    abstract containerOffset: {
        x: number;
        y: number;
    };
    protected cachePoint?: [number, number];
    protected cacheCursorPoint?: [number | undefined, number | undefined];
    protected active: boolean;
    protected toolsKey?: EToolsKey;
    protected activePointers: Set<number>;
    protected currentDrawingPointerId?: number;
    protected cursorMouseMove: (e: MouseEvent) => void;
    protected cursorMouseMoveDebounced: DebouncedFunc<(e: MouseEvent) => void>;
    protected cursorMouseMoveThrottled: DebouncedFuncLeading<(e: MouseEvent) => void>;
    protected cursorMouseMoveFun: (e: MouseEvent) => void;
    private _transferControlToOffscreenCanvas?;
    get moveDelayTime(): number;
    constructor(control: ApplianceManagerLike, internalMsgEmitter: EventEmitter2, viewId: string);
    protected cursorMouseLeave: () => void;
    abstract setCanvassStyle(): void;
    setTransferControlToOffscreenCanvas(canvas: {
        bgCanvas: HTMLCanvasElement;
        serviceCanvas: HTMLCanvasElement;
        localCanvas: HTMLCanvasElement;
    }): void;
    get transferControlToOffscreenCanvas(): {
        bgCanvas: OffscreenCanvas;
        serviceCanvas: OffscreenCanvas;
        localCanvas: OffscreenCanvas;
    } | undefined;
    get worker(): import("../core/mainEngine").MasterControlForWorker;
    bindToolsClass(): void;
    mountView(): void;
    updateSize(): void;
    reflashContainerOffset(): void;
    get parentElement(): HTMLElement | null | undefined;
    destroy(): void;
    getPoint(e: any): [number, number] | undefined;
    getActive(): boolean;
    setActive(bol: boolean): void;
    focusElement(): void;
    stopEventHandler(): Promise<void>;
    protected getTranslate(element: any): any[];
    protected getContainerOffset(eventTraget: HTMLDivElement, offset: {
        x: number;
        y: number;
    }): {
        x: any;
        y: any;
    };
    abstract get viewId(): string;
    protected mousedown: (e: MouseEvent) => void;
    protected mousemove: (e: MouseEvent) => void;
    protected mouseup: (e: MouseEvent) => void;
    protected touchstart: (e: TouchEvent) => void;
    protected touchmove: (e: TouchEvent) => void;
    protected touchend: (e: TouchEvent) => void;
    protected keydown: (e: KeyboardEvent) => void;
    protected pointerdown: (e: PointerEvent) => void;
    protected pointermove: (e: PointerEvent) => void;
    protected pointerup: (e: PointerEvent) => void;
    protected bindDisplayerEvent(div: HTMLDivElement): void;
    protected removeDisplayerEvent(div: HTMLDivElement): void;
    get isBezier(): boolean;
    get maxDrawCount(): number;
    /** 检查是否超过最大绘制数量 */
    checkConsumeCount(): boolean;
}
/** appView容器管理器抽象 */
export declare abstract class AppViewDisplayerManager extends BaseViewDisplayerManager {
    private _viewId;
    constructor(viewId: string, control: ApplianceManagerLike, internalMsgEmitter: EventEmitter2);
    get viewId(): string;
    setViewId(viewId: string): void;
}
/** 主容器管理器抽象 */
export declare abstract class MainViewDisplayerManager extends BaseViewDisplayerManager {
    abstract snapshotContainerRef?: React.RefObject<HTMLDivElement>;
    abstract backgroundSnapshotContainerRef?: React.RefObject<HTMLDivElement>;
    constructor(control: ApplianceManagerLike, internalMsgEmitter: EventEmitter2);
    get viewId(): string;
    updateSize(): void;
    destroy(): void;
}
