import { Map as OLMap } from 'ol';
import { BaseDrawing, DrawingStyleConfig } from './BaseDrawing';
import { TooltipStyleConfig } from '../TooltipHelper';

/**
 * 绘制模式
 */
export type DrawingMode = "point" | "line" | "polygon" | "circle" | "rectangle" | "star" | "text" | "multipoint" | "multilinestring" | "multipolygon" | "select" | "modify" | "none";
/**
 * 绘制事件类型
 */
export interface DrawingManagerEvents {
    "drawing-start": (drawing: BaseDrawing<any, any>) => void;
    "drawing-end": (drawing: BaseDrawing<any, any>) => void;
    "drawing-select": (drawing: BaseDrawing<any, any> | null) => void;
    "drawing-modify": (drawing: BaseDrawing<any, any>) => void;
    "drawing-delete": (drawing: BaseDrawing<any, any>) => void;
    "mode-change": (mode: DrawingMode) => void;
}
/**
 * 标绘管理器配置
 */
export interface DrawingManagerConfig {
    map: OLMap;
    layerName?: string;
    zIndex?: number;
    enableSnap?: boolean;
    snapTolerance?: number;
    enableModify?: boolean;
    enableSelect?: boolean;
    multiSelect?: boolean;
    allowContinuousDrawing?: boolean;
    defaultStyle?: DrawingStyleConfig;
    enableTooltip?: boolean;
    tooltipStyle?: Partial<TooltipStyleConfig>;
    isCompare?: boolean;
}
/**
 * 标绘管理器
 * 统一管理所有标绘对象，提供绘制、编辑、选择等功能
 */
export declare class DrawingManager {
    private _map;
    private _layer;
    private _source;
    private _drawings;
    private _currentMode;
    private _drawInteraction;
    private _selectInteraction;
    private _modifyInteraction;
    private _snapInteraction;
    private _selectedDrawing;
    private _eventListeners;
    private _config;
    private _currentDrawingStyle;
    private _tooltipHelper;
    private _pointerMoveListener;
    private _multiLineStringDrawing;
    private _multiLineStringCoordinates;
    private _multiPolygonDrawing;
    private _multiPolygonCoordinates;
    private _originalMapEventListeners;
    private _mapEventsDisabled;
    constructor(config: DrawingManagerConfig);
    /**
     * 初始化图层
     */
    private initializeLayer;
    /**
     * 初始化交互
     */
    private initializeInteractions;
    /**
     * 初始化鼠标跟随提示
     */
    private initializeTooltip;
    /**
     * 初始化键盘快捷键
     */
    private initializeKeyboardShortcuts;
    /**
     * 处理键盘按下事件
     */
    private handleKeyDown;
    /**
     * 设置绘制模式
     */
    setMode(mode: DrawingMode, options?: DrawingStyleConfig & {
        allowContinuousDrawing?: boolean;
        disableMapInteractions?: boolean;
    }): void;
    /**
     * 获取当前模式
     */
    getMode(): DrawingMode;
    /**
     * 设置绘制交互
     */
    private setupDrawInteraction;
    /**
     * 清除绘制交互
     */
    /**
     * 创建绘制样式
     */
    private createDrawStyle;
    private clearDrawInteraction;
    /**
     * 启用/禁用选择和修改交互
     */
    private enableSelectAndModify;
    /**
     * 控制地图其他交互功能的启用/禁用
     */
    private toggleMapInteractions;
    /**
     * 控制地图事件监听器的启用/禁用
     */
    private toggleMapEventListeners;
    /**
     * 禁用地图事件监听器
     */
    private disableMapEventListeners;
    /**
     * 处理绘制开始
     */
    private handleDrawStart;
    /**
     * 处理绘制结束
     */
    private handleDrawEnd;
    /**
     * 创建点标绘
     */
    private createPointDrawing;
    /**
     * 创建线标绘
     */
    private createLineDrawing;
    /**
     * 创建多边形标绘
     */
    private createPolygonDrawing;
    /**
     * 创建圆形标绘
     */
    private createCircleDrawing;
    /**
     * 创建矩形标绘
     */
    private createRectangleDrawing;
    /**
     * 创建星形几何函数
     */
    private createStarGeometry;
    /**
     * 根据中心点和半径创建星形几何体
     */
    private createStarGeometryFromCenterRadius;
    /**
     * 从星形坐标计算中心点和半径
     */
    private calculateStarCenterAndRadius;
    /**
     * 创建最小星形几何体（用于异常情况）
     */
    private createMinimalStarGeometry;
    /**
     * 创建星形标绘
     */
    private createStarDrawing;
    /**
     * 创建文字标绘
     */
    private createTextDrawing;
    /**
     * 创建多点标绘
     */
    private createMultiPointDrawing;
    /**
     * 处理多线段绘制结束
     */
    private handleMultiLineStringDrawEnd;
    /**
     * 完成多线段标绘
     */
    private finishMultiLineStringDrawing;
    /**
     * 更新多线段进度显示
     */
    private updateMultiLineStringProgress;
    /**
     * 继续多线段绘制
     */
    private continueMultiLineStringDrawing;
    /**
     * 处理多边形绘制结束
     */
    private handleMultiPolygonDrawEnd;
    /**
     * 完成多边形标绘
     */
    private finishMultiPolygonDrawing;
    /**
     * 更新多边形进度显示
     */
    private updateMultiPolygonProgress;
    /**
     * 继续多边形绘制
     */
    private continueMultiPolygonDrawing;
    /**
     * 创建多线标绘（保留原方法作为备用）
     */
    private createMultiLineStringDrawing;
    /**
     * 创建多面标绘
     */
    private createMultiPolygonDrawing;
    /**
     * 处理选择事件
     */
    private handleSelect;
    /**
     * 处理修改开始事件
     */
    private handleModifyStart;
    /**
     * 处理修改
     */
    private handleModify;
    /**
     * 从要素更新标绘对象
     */
    private updateDrawingFromFeature;
    /**
     * 添加标绘对象
     */
    addDrawing(drawing: BaseDrawing<any, any>): void;
    /**
     * 移除标绘对象
     */
    removeDrawing(drawing: BaseDrawing<any, any> | string): boolean;
    /**
     * 获取标绘对象
     */
    getDrawing(id: string): BaseDrawing<any, any> | undefined;
    /**
     * 获取所有标绘对象
     */
    getAllDrawings(): BaseDrawing<any, any>[];
    /**
     * 选择标绘对象
     */
    selectDrawing(drawing: BaseDrawing<any, any> | null): void;
    /**
     * 获取选中的标绘对象
     */
    getSelectedDrawing(): BaseDrawing<any, any> | null;
    /**
     * 删除选中的标绘对象
     */
    deleteSelectedDrawing(): boolean;
    /**
     * 按类型删除标绘对象
     * @param type 标绘类型
     * @returns 删除的标绘对象数量
     */
    removeDrawingsByType(type: string): number;
    /**
     * 按ID列表批量删除标绘对象
     * @param ids 标绘ID数组
     * @returns 删除的标绘对象数量
     */
    removeDrawingsByIds(ids: string[]): number;
    /**
     * 按条件删除标绘对象
     * @param predicate 判断函数，返回true的标绘对象将被删除
     * @returns 删除的标绘对象数量
     */
    removeDrawingsByCondition(predicate: (drawing: BaseDrawing<any, any>) => boolean): number;
    /**
     * 删除指定区域内的标绘对象
     * @param extent 区域范围 [minX, minY, maxX, maxY]
     * @returns 删除的标绘对象数量
     */
    removeDrawingsInExtent(extent: [number, number, number, number]): number;
    /**
     * 复制选中的标绘对象
     */
    duplicateSelectedDrawing(): BaseDrawing<any, any> | null;
    /**
     * 从JSON数据创建标绘对象
     */
    private createDrawingFromInternalJSON;
    /**
     * 从GeoJSON Feature创建标绘对象
     */
    createDrawingFromGeoJSON(feature: any): BaseDrawing<any, any> | null;
    /**
     * 从标准GeoJSON FeatureCollection或单个Feature创建标绘对象
     */
    createDrawingFromJSON(geoJson: any): BaseDrawing<any, any>[];
    /**
     * 批量添加GeoJSON数据到地图
     */
    addGeoJSONData(geoJson: any): BaseDrawing<any, any>[];
    /**
     * 清除所有标绘
     */
    clearAll(): void;
    /**
     * 显示/隐藏图层
     */
    setVisible(visible: boolean): void;
    /**
     * 获取图层可见性
     */
    getVisible(): boolean;
    /**
     * 设置图层透明度
     */
    setOpacity(opacity: number): void;
    /**
     * 获取图层透明度
     */
    getOpacity(): number;
    /**
     * 导出为JSON
     */
    toJSON(): any;
    /**
     * 从JSON导入
     */
    fromJSON(data: any): void;
    /**
     * 添加事件监听器
     */
    on<K extends keyof DrawingManagerEvents>(event: K, listener: DrawingManagerEvents[K]): void;
    /**
     * 移除事件监听器
     */
    off<K extends keyof DrawingManagerEvents>(event: K, listener: DrawingManagerEvents[K]): void;
    /**
     * 触发事件
     */
    private emit;
    /**
     * 显示鼠标跟随提示
     */
    private showTooltip;
    /**
     * 隐藏鼠标跟随提示
     */
    private hideTooltip;
    /**
     * 更新多线段绘制的鼠标跟随提示
     */
    private updateMultiLineStringTooltip;
    /**
     * 更新多边形绘制的鼠标跟随提示
     */
    private updateMultiPolygonTooltip;
    /**
     * 设置捕捉功能启用状态
     */
    setSnapEnabled(enabled: boolean): void;
    /**
     * 设置修改功能启用状态
     */
    setModifyEnabled(enabled: boolean): void;
    /**
     * 设置选择功能启用状态
     */
    setSelectEnabled(enabled: boolean): void;
    /**
     * 设置连续绘制功能
     */
    setContinuousDrawing(enabled: boolean): void;
    /**
     * 销毁管理器
     */
    destroy(): void;
}
/**
 * 标绘管理器工厂
 */
export declare class DrawingManagerFactory {
    static create(config: DrawingManagerConfig): DrawingManager;
    /**
     * 创建带默认配置的管理器
     */
    static createDefault(map: OLMap): DrawingManager;
}
//# sourceMappingURL=DrawingManager.d.ts.map