import { App } from 'vue';
import { Map as OlMap } from 'ol';
import { PluginConfig, PluginInstance, PluginManagerConfig, PluginRegistration, PluginContext, PluginPosition, PluginSize, PluginStyle, PluginState, PluginHooks } from '../types/plugin';
import { MapManager } from './MapManager';

/**
 * 插件实例实现
 */
declare class PluginInstanceImpl implements PluginInstance {
    id: string;
    config: PluginConfig;
    context: PluginContext;
    element?: HTMLElement;
    component?: any;
    state: PluginState;
    private eventHandlers;
    private hooks;
    constructor(config: PluginConfig, context: PluginContext, hooks?: PluginHooks);
    mount(): Promise<void>;
    unmount(): Promise<void>;
    show(): void;
    hide(): void;
    isVisible(): boolean;
    isEnabled(): boolean;
    setPosition(position: PluginPosition, offset?: {
        x: number;
        y: number;
    }): void;
    getPosition(): {
        position: PluginPosition;
        offset?: {
            x: number;
            y: number;
        };
    };
    setSize(size: PluginSize): void;
    getSize(): PluginSize;
    setStyle(style: Partial<PluginStyle>): void;
    getStyle(): PluginStyle;
    emit(event: string, ...args: any[]): void;
    on(event: string, handler: Function): void;
    off(event: string, handler?: Function): void;
    updateConfig(config: Partial<PluginConfig>): void;
    destroy(): void;
}
/**
 * 插件管理器
 */
export declare class PluginManager {
    private app?;
    private map?;
    private mapManager?;
    private config;
    private registrations;
    private instances;
    private pluginsByPosition;
    private globalHooks;
    constructor(config?: PluginManagerConfig);
    /**
     * 设置Vue应用实例
     */
    setApp(app: App): void;
    /**
     * 设置地图实例
     */
    setMap(map: OlMap): void;
    /**
     * 设置地图管理器
     */
    setMapManager(mapManager: MapManager): void;
    /**
     * 注册插件
     */
    register(registration: PluginRegistration): void;
    /**
     * 注销插件
     */
    unregister(id: string): void;
    /**
     * 创建插件实例
     */
    create(config: PluginConfig): Promise<PluginInstance>;
    /**
     * 添加插件实例
     */
    add(config: PluginConfig): Promise<PluginInstance>;
    /**
     * 移除插件实例
     */
    remove(id: string): Promise<void>;
    /**
     * 获取插件实例
     */
    get(id: string): PluginInstance | undefined;
    /**
     * 获取所有插件实例
     */
    getAll(): PluginInstance[];
    /**
     * 根据位置获取插件
     */
    getByPosition(position: PluginPosition): PluginInstance[];
    /**
     * 获取所有位置的插件分组
     */
    getAllByPosition(): Map<PluginPosition, PluginInstance[]>;
    /**
     * 更新插件配置
     */
    updateConfig(id: string, config: Partial<PluginConfig>): Promise<void>;
    /**
     * 批量操作
     */
    batch(operations: Array<{
        action: "add" | "remove" | "update";
        config?: PluginConfig;
        id?: string;
    }>): Promise<void>;
    /**
     * 设置全局钩子
     */
    setGlobalHooks(hooks: PluginHooks): void;
    /**
     * 销毁管理器
     */
    destroy(): Promise<void>;
    /**
     * 创建插件上下文
     */
    private createContext;
    /**
     * 检查权限
     */
    private checkPermissions;
    /**
     * 添加到位置分组
     */
    private addToPositionGroup;
    /**
     * 从位置分组中移除
     */
    private removeFromPositionGroup;
    /**
     * 初始化内置插件
     */
    private initializeBuiltinPlugins;
}
/**
 * 获取全局插件管理器
 */
export declare function getPluginManager(): PluginManager;
/**
 * 设置全局插件管理器
 */
export declare function setPluginManager(manager: PluginManager): void;
export { PluginInstanceImpl };
export type { PluginInstance };
//# sourceMappingURL=PluginManager.d.ts.map