import type EventEmitter2 from "eventemitter2";
import type { MasterControlForWorker } from "./mainEngine";
import type { ApplianceManagerLike, BaseSubWorkModuleProps } from "../plugin/types";
import { EToolsKey, EvevtWorkState } from "../core/enum";
export interface FloatBarOptions {
    icon: string;
    activeIcon: string;
    onClick: () => void;
}
/**
 * 插件的监听器类型
 */
export type PluginListener = {
    /** 设置教具类型 */
    setToolkey: (data: EToolsKey) => void;
    /** 同步笔记数据 */
    syncStorage: (viewId: string, scenePath?: string) => void;
    /** 改变场景 */
    sceneChange: (viewId: string, scenePath: string) => void;
    /** 本地event事件 */
    localEvent: (viewId: string, eventState: EvevtWorkState, point: [number, number]) => void;
};
export type PluginEvent = keyof PluginListener;
export type PluginCallback<T extends PluginEvent> = PluginListener[T];
export type PluginParams<T extends PluginEvent> = Parameters<PluginListener[T]>;
export declare const plugin_map: Map<string, Plugin>;
export declare abstract class Plugin {
    abstract readonly kind: string;
    control: ApplianceManagerLike;
    private _listeners;
    abstract onDestroy(): void;
    abstract onCreate(): void;
    abstract mount(): void;
    abstract unMount(): void;
    _inject(applianceManager: ApplianceManagerLike): void;
    _onEvent<T extends PluginEvent>(eventName: T, params: PluginParams<T>): void;
    protected callbacks(eventName: PluginEvent, callback: PluginCallback<PluginEvent>): void;
    protected removeCallback(eventName: PluginEvent): void;
}
export declare class PluginManager {
    readonly control: ApplianceManagerLike;
    readonly worker: MasterControlForWorker;
    readonly publicMsgEmitter: EventEmitter2;
    private plugins;
    constructor(props: BaseSubWorkModuleProps);
    use(plugin: Plugin): void;
    destroy(): void;
    dispatchPluginEvent(eventName: PluginEvent, ...data: PluginParams<PluginEvent>): void;
}
