import { Map as OlMap, Feature } from 'ol';
import { Coordinate } from 'ol/coordinate';
import { PopupConfig, PopupManagerConfig, PopupType } from '../components/OlMapPopup/types';

/**
 * Popup 管理器类
 * 负责创建、管理和销毁不同类型的 popup 实例
 * 支持按图层分组管理 popup
 */
export declare class PopupManager {
    private map;
    private config;
    private activePopups;
    private layerPopups;
    private layerConfigs;
    private popupCounter;
    constructor(map: OlMap, config?: PopupManagerConfig);
    /**
     * 创建并显示 popup
     */
    createPopup(type: PopupType, config: PopupConfig, coordinate: Coordinate, feature?: Feature, layerId?: string): string;
    /**
     * 设置图层级别的 popup 配置
     */
    setLayerPopupConfig(layerId: string, config: PopupManagerConfig): void;
    /**
     * 获取图层级别的 popup 配置
     */
    getLayerPopupConfig(layerId: string): PopupManagerConfig | undefined;
    /**
     * 关闭指定图层的最旧 popup
     */
    private closeOldestPopupInLayer;
    /**
     * 关闭指定图层的所有 popup
     */
    closeLayerPopups(layerId: string): void;
    /**
     * 关闭指定的 popup
     */
    closePopup(popupId: string): boolean;
    /**
     * 关闭所有 popup
     */
    closeAllPopups(): void;
    /**
     * 替换当前的 popup（避免闪烁）
     */
    replacePopup(type: PopupType, config: PopupConfig, coordinate: Coordinate, feature?: Feature): string;
    /**
     * 更新 popup 位置
     */
    updatePopupPosition(popupId: string, coordinate: Coordinate): boolean;
    /**
     * 获取活动的 popup 数量
     */
    getActivePopupCount(): number;
    /**
     * 获取所有活动的 popup ID
     */
    getActivePopupIds(): string[];
    /**
     * 检查指定 popup 是否存在
     */
    hasPopup(popupId: string): boolean;
    /**
     * 销毁管理器
     */
    destroy(): void;
    /**
     * 创建 popup 实例
     */
    private createPopupInstance;
    /**
     * 显示 popup
     */
    private showPopup;
    /**
     * 隐藏 popup
     */
    private hidePopup;
    /**
     * 销毁 popup
     */
    private destroyPopup;
    /**
     * 关闭最旧的 popup
     */
    private closeOldestPopup;
    /**
     * 生成唯一的 popup ID
     */
    private generatePopupId;
    /**
     * 处理地图点击事件
     * 注意：此方法现在由 MapContainer 控制调用时机
     * 只有在点击空白区域（非要素）时才会被调用
     */
    private handleMapClick;
    /**
     * 动态合并图层配置（用于单次popup创建）
     */
    private mergeConfigForLayer;
}
export declare function createPopupManager(map: OlMap, config?: PopupManagerConfig, globalPopupConfig?: PopupManagerConfig): PopupManager;
/**
 * 默认导出
 */
export default PopupManager;
//# sourceMappingURL=PopupManager.d.ts.map