import { Layer } from 'ol/layer';
import { Source } from 'ol/source';
import { LayerConfig } from '../../types';
import { Map as OLMap } from 'ol';

/**
 * 图层处理器接口
 */
export interface ILayerHandler {
    /**
     * 创建图层
     */
    createLayer(): Layer<Source> | Promise<Layer<Source>>;
    /**
     * 获取图层实例
     */
    getLayer(): Layer<Source>;
    /**
     * 异步获取图层实例
     */
    getLayerAsync(): Promise<Layer<Source>>;
    /**
     * 获取图层配置
     */
    getConfig(): LayerConfig;
    /**
     * 更新图层配置
     */
    updateConfig(newConfig: Partial<LayerConfig>): void;
    /**
     * 设置地图实例
     */
    setMap(map: OLMap): void;
    /**
     * 设置图层透明度
     */
    setOpacity(opacity: number): void;
    /**
     * 设置图层可见性
     */
    setVisible(visible: boolean): void;
    /**
     * 设置图层层级
     */
    setZIndex(zIndex: number): void;
    setZIndexByOrder(baseIndex?: number, increment?: number): void;
    /**
     * 获取图层层级
     */
    getZIndex(): number | undefined;
    /**
     * 更新图层样式
     */
    updateLayerStyles(style?: LayerConfig["style"], customCss?: string, cssClass?: string): void;
    updateSuperMapConfig?: (config: {
        format?: string;
        transparent?: boolean;
        cacheEnabled?: boolean;
        autoFetchMetadata?: boolean;
    }) => void;
    refresh?: (options?: {
        params?: Record<string, any>;
        body?: Record<string, any> | string;
    }) => void | Promise<void>;
    updateRequestParams?: (params: Record<string, any>) => void;
    /**
     * 销毁图层
     */
    destroy(): void;
}
/**
 * 图层类型枚举
 */
export declare enum LayerType {
    TILE = "tile",
    WMS = "wms",
    WMTS = "wmts",
    WFS = "wfs",
    GEOJSON = "geojson",
    VECTOR = "vector",
    KML = "kml",
    GML = "gml",
    WKT = "wkt",
    HEATMAP = "heatmap",
    CLUSTER = "cluster",
    CANVAS = "canvas",
    IMAGE_VECTOR = "image_vector",
    VECTOR_TILE = "vector_tile"
}
/**
 * 图层工厂接口
 */
export interface ILayerFactory {
    /**
     * 创建图层处理器
     */
    createLayerHandler(config: LayerConfig): ILayerHandler;
    /**
     * 注册图层类型处理器
     */
    registerLayerType(type: string, handlerClass: new (config: LayerConfig) => ILayerHandler): void;
    /**
     * 获取支持的图层类型
     */
    getSupportedTypes(): string[];
}
//# sourceMappingURL=interfaces.d.ts.map