import { Map as OLMap } from 'ol';
import { Coordinate } from 'ol/coordinate';
import { Pixel } from 'ol/pixel';
import { LayerManager } from './LayerManager';

export interface MapEvents {
    "map:click": {
        coordinate: Coordinate;
        pixel: Pixel;
        originalEvent: Event;
    };
    "map:dblclick": {
        coordinate: Coordinate;
        pixel: Pixel;
        originalEvent: Event;
    };
    "map:contextmenu": {
        coordinate: Coordinate;
        pixel: Pixel;
        originalEvent: Event;
    };
    "map:pointermove": {
        coordinate: Coordinate;
        pixel: Pixel;
        originalEvent: Event;
    };
    "map:pointerenter": {
        coordinate: Coordinate;
        pixel: Pixel;
        originalEvent: Event;
    };
    "map:pointerleave": {
        coordinate: Coordinate;
        pixel: Pixel;
        originalEvent: Event;
    };
    "map:movestart": {
        center: Coordinate;
        zoom: number;
    };
    "map:moveend": {
        center: Coordinate;
        zoom: number;
        extent: number[];
    };
    "map:zoomchange": {
        zoom: number;
        oldZoom: number;
    };
    "map:featureinfo": {
        coordinate: Coordinate;
        pixel: Pixel;
        originalEvent: Event;
        layerData?: any[];
        features?: any[];
    };
    "layer:loadstart": {
        layerId: string;
        layerName: string;
    };
    "layer:loadend": {
        layerId: string;
        layerName: string;
    };
    "layer:loaderror": {
        layerId: string;
        layerName: string;
        error: any;
    };
    "layer:visibilitychange": {
        layerId: string;
        layerName: string;
        visible: boolean;
    };
    "layer:opacitychange": {
        layerId: string;
        layerName: string;
        opacity: number;
    };
}
export interface EventManagerConfig {
    /** 是否启用事件管理 */
    enabled: boolean;
    /** 是否使用mitt事件总线 */
    useMitt?: boolean;
    /** 自定义mitt实例 */
    mittInstance?: any;
    /** 启用的事件类型 */
    enabledEvents?: (keyof MapEvents)[];
    /** 防抖延迟(ms) */
    debounceDelay?: number;
    /** 是否启用要素信息查询 */
    enableFeatureInfo?: boolean;
}
export declare class EventManager {
    private map;
    private layerManager;
    private config;
    private mittEmitter;
    private listeners;
    private debounceTimers;
    private lastZoom;
    constructor(map: OLMap, layerManager: LayerManager, config: EventManagerConfig);
    /**
     * 设置事件监听器
     */
    private setupEventListeners;
    /**
     * 添加地图事件监听器
     */
    private addMapListener;
    /**
     * 防抖处理
     */
    private debounce;
    /**
     * 发射事件
     */
    private emit;
    /**
     * 监听事件
     */
    on<T extends keyof MapEvents>(eventType: T, handler: (data: MapEvents[T]) => void): void;
    /**
     * 取消监听事件
     */
    off<T extends keyof MapEvents>(eventType: T, handler?: (data: MapEvents[T]) => void): void;
    /**
     * 监听一次事件
     */
    once<T extends keyof MapEvents>(eventType: T, handler: (data: MapEvents[T]) => void): void;
    /**
     * 获取mitt实例
     */
    getMittEmitter(): any;
    /**
     * 更新配置
     */
    updateConfig(newConfig: Partial<EventManagerConfig>): void;
    /**
     * 销毁事件管理器
     */
    destroy(): void;
}
export declare const globalMapEmitter: import('mitt').Emitter<Record<import('mitt').EventType, unknown>>;
//# sourceMappingURL=EventManager.d.ts.map