import EventEmitter2 from "eventemitter2";
import { EStrokeType, MemberState, AppliancePluginLike } from "./types";
import { Collector, ViewId } from "../collector";
import { RoomMemberManager } from "../members";
import { TextEditorManager } from "../component/textEditor";
import type { Camera, Displayer, DisplayerCallbacks, ISVGMarkmapInformation, ISVGUrlInformation, IconifyInformation, Logger, MarkmapId, Player, Rectangle, RequiredAppliancePluginOptions, Room, RoomMember, _ArrayTrue } from "./types";
import { CursorManager } from "../cursors";
import { ViewContainerManager } from "./baseViewContainerManager";
import { MasterControlForWorker } from "../core/mainEngine";
import { EToolsKey } from "../core/enum";
import { BaseShapeOptions } from "../core/tools/base";
import { ICameraOpt } from "../core/types";
import { HotkeyManager } from "../hotkey";
import { RenderCotrolImple } from "../core/renderCotrol";
import { MiniMapManagerImpl } from "../component/miniMap/manager";
import { PluginManager, Plugin } from "../core/plugin";
export interface BaseApplianceManagerProps {
    displayer: Displayer<DisplayerCallbacks>;
    plugin?: AppliancePluginLike;
    options: RequiredAppliancePluginOptions;
}
/** 插件管理器 */
export declare abstract class BaseApplianceManager {
    static InternalMsgEmitter: EventEmitter2;
    static PublicMsgEmitter: EventEmitter2;
    readonly version: string;
    plugin?: AppliancePluginLike;
    readonly logger: Logger;
    readonly room?: Room;
    readonly play?: Player;
    collector?: Collector;
    hasSwitchToSelectorEffect?: boolean;
    snapshootStateMap?: Map<string, unknown>;
    private _disableDeviceInputs?;
    private _disableEraseImage?;
    private _disableEraseText?;
    private _disableCameraTransform?;
    private _disableUseWorker?;
    effectResolve?: (value: boolean) => void;
    readonly hotkeyManager: HotkeyManager;
    readonly pluginOptions: RequiredAppliancePluginOptions;
    readonly roomMember: RoomMemberManager;
    readonly cursor: CursorManager;
    readonly textEditorManager: TextEditorManager;
    readonly worker: MasterControlForWorker;
    abstract readonly viewContainerManager: ViewContainerManager;
    readonly renderControl: RenderCotrolImple;
    readonly miniMapManager?: MiniMapManagerImpl;
    readonly pluginManager?: PluginManager;
    private _isPolyfill;
    constructor(params: BaseApplianceManagerProps);
    hasPolyfillMethod(methodName: "requestIdleCallback" | "cancelIdleCallback"): boolean;
    registerPolyfillMethod(methodName: "requestIdleCallback" | "cancelIdleCallback"): void;
    get hasExtendFontFaces(): boolean;
    get extendFontFaces(): {
        fontFamily: string;
        src: string;
    }[];
    get loadFontFacesTimeout(): number;
    get disableEraseText(): boolean;
    set disableEraseText(bol: boolean);
    get disableEraseImage(): boolean;
    set disableEraseImage(bol: boolean);
    get disableDeviceInputs(): boolean;
    set disableDeviceInputs(bol: boolean);
    get disableCameraTransform(): boolean;
    set disableCameraTransform(bol: boolean);
    get disableUseWorker(): boolean;
    set disableUseWorker(bol: boolean);
    get hasOffscreenCanvas(): boolean;
    get canUseTransferControlToOffscreen(): boolean;
    get isUseOffscreenTransfer(): boolean;
    /** 是否使用简单模式, 简单模式则无需开启 miniMap 和 plugin */
    get isUseSimple(): boolean;
    /** 是否使用背景画布, 默认false */
    get isUseBackgroundThread(): boolean;
    bindPlugin(plugin: AppliancePluginLike): void;
    /** 激活 plugin */
    abstract activePlugin(): void;
    /** 初始化 */
    abstract init(): void;
    /** 激活worker */
    abstract activeWorker(): Promise<void>;
    /** 销毁 */
    destroy(): void;
    /** 清空当前获焦路径下的所有内容 */
    cleanCurrentScene(): void;
    setWritable(isWritable: boolean): Promise<void>;
    /** 监听读写状态变更 */
    onWritableChange(isWritable: boolean): void;
    /** 监听路径变化 */
    onSceneChange: (scenePath: string, viewId: string) => Promise<void>;
    /** 监听房间成员变化 */
    onRoomMembersChange: (roomMembers: readonly RoomMember[]) => void;
    /** 监听房间教具变更 */
    onMemberChange: import("lodash").DebouncedFunc<(memberState: MemberState) => void>;
    /** 获取当前工具key */
    protected getToolsKey(memberState: MemberState): EToolsKey.Pencil | EToolsKey.Eraser | EToolsKey.PencilEraser | EToolsKey.BitMapEraser | EToolsKey.Selector | EToolsKey.Clicker | EToolsKey.Arrow | EToolsKey.LaserPen | EToolsKey.Text | EToolsKey.Straight | EToolsKey.Rectangle | EToolsKey.Ellipse | EToolsKey.Star | EToolsKey.Polygon | EToolsKey.SpeechBalloon;
    /** 获取当前工具默认配置 */
    getToolsOpt(toolsKey: EToolsKey, memberState: MemberState): {
        toolsType: EToolsKey.Clicker;
        toolsOpt: {};
    } | {
        toolsType: EToolsKey.Pencil | EToolsKey.Eraser | EToolsKey.PencilEraser | EToolsKey.BitMapEraser | EToolsKey.Selector | EToolsKey.Arrow | EToolsKey.Hand | EToolsKey.LaserPen | EToolsKey.Text | EToolsKey.Straight | EToolsKey.Rectangle | EToolsKey.Ellipse | EToolsKey.Star | EToolsKey.Triangle | EToolsKey.Rhombus | EToolsKey.Polygon | EToolsKey.SpeechBalloon | EToolsKey.Image | EToolsKey.BackgroundSVG;
        toolsOpt: BaseShapeOptions;
    };
    getLineCap(strokeType: EStrokeType): "round" | "square" | undefined;
    getLineDash(strokeType: EStrokeType): [number, number] | undefined;
    /** 激活当前view容器*/
    effectViewContainer(toolsKey: EToolsKey): void;
    internalSceneChange: (viewId: string, scenePath: string) => void;
    internalCameraChange: (viewId: string, cameraOpt: ICameraOpt) => void;
    /** 异步获取指定路径下绘制内容的区域大小 */
    getBoundingRect(scenePath: string): Promise<Rectangle | undefined>;
    /** 异步获取指定路径下的的快照并绘制到指定的画布上 */
    screenshotToCanvas(context: CanvasRenderingContext2D, scenePath: string, width?: number, height?: number, camera?: Camera, originX?: number, originY?: number): Promise<void>;
    /** 异步获取指定路径下的缩略图 */
    scenePreview(scenePath: string, img: HTMLImageElement): Promise<void>;
    switchToText(): void;
    /** 切换到选择工具 */
    switchToSelector(): void;
    /** 开始执行副作用 */
    runEffectWork(callback?: () => void): Promise<void>;
    setSnapshootData(): void;
    getSnapshootData(key: string): unknown;
    clearSnapshootData(): void;
    useBitMapEraser(bol: boolean): void;
    consoleWorkerInfo(): void;
    filterRenderByUid(viewId: ViewId, option: {
        render?: _ArrayTrue;
        hide?: _ArrayTrue;
        clear?: _ArrayTrue;
    }, isSync?: boolean): void;
    cancelFilterRender(viewId: ViewId, isSync?: boolean): void;
    createMiniMap(viewId: string, div: HTMLElement): Promise<void>;
    destroyMiniMap(viewId: string): Promise<void>;
    insertIconify(viewId: string, iconifyInfo: IconifyInformation): void;
    insertBackgroundSVG(viewId: string, svgInfo: ISVGUrlInformation): void;
    insertBackgroundMarkMap(viewId: string, svgInfo: ISVGMarkmapInformation): Promise<MarkmapId | undefined>;
    updateBackgroundMarkMap(viewId: string, markmapId: string, svgInfo: ISVGMarkmapInformation): void;
    usePlugin(plugin: Plugin): void | undefined;
    stopDraw(viewId: string): Promise<void>;
    setViewLocalScenePathChange(viewId: string, scenePath: string): Promise<void>;
}
