import { MapConfig, LayerConfig, MapControlsConfig } from '../types';

/**
 * 配置文件接口
 */
export interface OpenLayersConfig {
    view?: {
        center?: [number, number];
        zoom?: number;
        minZoom?: number;
        maxZoom?: number;
        projection?: string;
        extent?: [number, number, number, number];
        enableRotation?: boolean;
    };
    controls?: MapControlsConfig;
    baseLayers?: LayerConfig[];
    overlayLayers?: LayerConfig[];
    vectorLayers?: LayerConfig[];
    interactions?: {
        doubleClickZoom?: boolean;
        dragAndDrop?: boolean;
        dragPan?: boolean;
        keyboardPan?: boolean;
        keyboardZoom?: boolean;
        mouseWheelZoom?: boolean;
        pointer?: boolean;
        select?: boolean;
    };
    popup?: {
        enabled?: boolean;
        closeButton?: boolean;
        positioning?: string;
        autoPan?: boolean;
    };
    layerSwitcher?: {
        enabled?: boolean;
        position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
        collapsible?: boolean;
    };
    measurement?: {
        enabled?: boolean;
        tools?: ("length" | "area" | "angle")[];
        units?: {
            length?: "metric" | "imperial";
            area?: "metric" | "imperial";
        };
    };
    drawing?: {
        enabled?: boolean;
        tools?: ("point" | "line" | "polygon" | "circle" | "rectangle")[];
        styles?: {
            stroke?: {
                color?: string;
                width?: number;
            };
            fill?: {
                color?: string;
            };
        };
    };
}
/**
 * 配置加载器类
 */
export declare class ConfigLoader {
    /**
     * 从URL加载配置文件
     * @param configUrl 配置文件URL
     * @returns Promise<OpenLayersConfig>
     */
    static loadFromUrl(configUrl: string): Promise<OpenLayersConfig>;
    /**
     * 从JSON字符串加载配置
     * @param configJson JSON字符串
     * @returns OpenLayersConfig
     */
    static loadFromJson(configJson: string): OpenLayersConfig;
    /**
     * 从配置对象加载
     * @param config 配置对象
     * @returns OpenLayersConfig
     */
    static loadFromObject(config: any): OpenLayersConfig;
    /**
     * 验证配置对象
     * @param config 原始配置对象
     * @returns OpenLayersConfig
     */
    private static validateConfig;
    /**
     * 将配置转换为MapConfig
     * @param config OpenLayers配置
     * @returns MapConfig
     */
    static toMapConfig(config: OpenLayersConfig): Partial<MapConfig>;
    /**
     * 获取所有图层配置
     * @param config OpenLayers配置
     * @returns LayerConfig[]
     */
    static getAllLayers(config: OpenLayersConfig): LayerConfig[];
    /**
     * 获取功能配置
     * @param config OpenLayers配置
     * @returns 功能配置对象
     */
    static getFeatureConfig(config: OpenLayersConfig): {
        measurement: {
            enabled?: boolean;
            tools?: ("area" | "length" | "angle")[];
            units?: {
                length?: "metric" | "imperial";
                area?: "metric" | "imperial";
            };
        };
        drawing: {
            enabled?: boolean;
            tools?: ("circle" | "line" | "polygon" | "point" | "rectangle")[];
            styles?: {
                stroke?: {
                    color?: string;
                    width?: number;
                };
                fill?: {
                    color?: string;
                };
            };
        };
        layerSwitcher: {
            enabled?: boolean;
            position?: "bottom-left" | "bottom-right" | "top-left" | "top-right";
            collapsible?: boolean;
        };
        popup: {
            enabled?: boolean;
            closeButton?: boolean;
            positioning?: string;
            autoPan?: boolean;
        };
        interactions: {
            doubleClickZoom?: boolean;
            dragAndDrop?: boolean;
            dragPan?: boolean;
            keyboardPan?: boolean;
            keyboardZoom?: boolean;
            mouseWheelZoom?: boolean;
            pointer?: boolean;
            select?: boolean;
        };
    };
    /**
     * 生成默认配置
     * @returns OpenLayersConfig
     */
    static getDefaultConfig(): OpenLayersConfig;
}
export default ConfigLoader;
//# sourceMappingURL=configLoader.d.ts.map