import { Emitter } from 'mitt';

export interface LayerEventBusEvents {
    [key: string]: unknown;
    [key: symbol]: unknown;
    "layer-visibility-changed": {
        layerId: string;
        visible: boolean;
        layerName: string;
        layerType: string;
    };
    "layer-added": {
        layerId: string;
        layerName: string;
        layerType: string;
        visible: boolean;
        layerConfig?: any;
    };
    "layer-removed": {
        layerId: string;
        layerName: string;
        layerType: string;
    };
    "layers-updated": {
        visibleLayers: Array<{
            id: string;
            name: string;
            type: string;
            visible: boolean;
        }>;
    };
    "basemap-changed": {
        basemapId: string;
        basemapName: string;
        basemapType: string;
    };
    "layers-initialized": {
        layers: any[];
    };
    "layer-opacity-changed": {
        layerId: string;
        opacity: number;
    };
    "layer-config-updated": {
        layerId: string;
        config: any;
    };
    "layer-order-changed": {
        layerIds: string[];
    };
}
/**
 * 图层事件总线类
 * 每个地图组件实例都应该创建自己的事件总线实例，避免多实例之间的事件干扰
 */
export declare class LayerEventBus {
    private emitter;
    constructor();
    emit<Key extends keyof LayerEventBusEvents>(type: Key, event: LayerEventBusEvents[Key]): void;
    on<Key extends keyof LayerEventBusEvents>(type: Key, handler: (event: LayerEventBusEvents[Key]) => void): void;
    off<Key extends keyof LayerEventBusEvents>(type: Key, handler?: (event: LayerEventBusEvents[Key]) => void): void;
    clear(): void;
}
export declare function createLayerEventBus(): LayerEventBus;
export declare const layerEventBus: Emitter<LayerEventBusEvents>;
//# sourceMappingURL=EventBus.d.ts.map