import { Style } from 'ol/style';
import { Coordinate } from 'ol/coordinate';
import { BaseDrawing, DrawingConfig, DrawingStyleConfig } from './BaseDrawing';

/**
 * 面标绘样式配置
 */
export interface PolygonStyleConfig extends DrawingStyleConfig {
    fillColor?: string;
    strokeColor?: string;
    strokeWidth?: number;
    strokeDash?: number[];
    strokeOpacity?: number;
    fillOpacity?: number;
    showVertices?: boolean;
    vertexSize?: number;
    vertexColor?: string;
    showArea?: boolean;
    areaUnit?: "m²" | "km²" | "ha" | "acre" | "ft²";
    areaPrecision?: number;
    showPerimeter?: boolean;
    perimeterUnit?: "m" | "km" | "mi" | "ft";
    perimeterPrecision?: number;
}
/**
 * 面标绘配置
 */
export interface PolygonDrawingConfig extends DrawingConfig {
    type: "polygon" | "circle" | "rectangle" | "star";
    coordinates?: Coordinate[] | {
        center: Coordinate;
        radius: number;
    } | {
        topLeft: Coordinate;
        bottomRight: Coordinate;
    };
    style?: PolygonStyleConfig;
}
/**
 * 面标绘类
 * 支持多边形、圆形、矩形等面状图形的绘制
 */
export declare class PolygonDrawing extends BaseDrawing<PolygonDrawingConfig, PolygonStyleConfig> {
    constructor(config: PolygonDrawingConfig);
    /**
     * 创建要素
     */
    protected createFeature(): void;
    /**
     * 创建多边形几何
     */
    private createPolygonGeometry;
    /**
     * 创建圆形几何
     */
    private createCircleGeometry;
    /**
     * 创建矩形几何
     */
    private createRectangleGeometry;
    /**
     * 创建星形几何
     */
    private createStarGeometry;
    /**
     * 创建样式
     */
    protected createStyle(): Style | Style[];
    /**
     * 创建主面样式
     */
    private createPolygonStyle;
    /**
     * 创建顶点样式
     */
    private createVertexStyles;
    /**
     * 创建面积标注样式
     */
    private createAreaStyle;
    /**
     * 创建周长标注样式
     */
    private createPerimeterStyle;
    /**
     * 创建文字样式
     */
    private createTextStyle;
    /**
     * 更新要素几何
     */
    protected updateFeatureGeometry(): void;
    /**
     * 创建选择样式
     */
    protected createSelectionStyles(): Style[];
    /**
     * 创建编辑控制点样式
     */
    private createEditHandleStyles;
    /**
     * 获取图形中心点
     */
    private getCenterPoint;
    /**
     * 计算面积
     */
    private calculateArea;
    /**
     * 计算周长
     */
    private calculatePerimeter;
    /**
     * 格式化面积显示
     */
    private formatArea;
    /**
     * 格式化周长显示
     */
    private formatPerimeter;
    /**
     * 设置坐标
     */
    setCoordinates(coordinates: Coordinate[] | {
        center: Coordinate;
        radius: number;
    } | {
        topLeft: Coordinate;
        bottomRight: Coordinate;
    }): void;
    /**
     * 获取坐标
     */
    getCoordinates(): Coordinate[] | {
        center: Coordinate;
        radius: number;
    } | {
        topLeft: Coordinate;
        bottomRight: Coordinate;
    };
    /**
     * 获取完整的多边形坐标数组（适用于所有类型）
     */
    getPolygonCoordinates(): Coordinate[];
    /**
     * 添加顶点（仅适用于多边形）
     */
    addVertex(coordinate: Coordinate, index?: number): void;
    /**
     * 移除顶点（仅适用于多边形）
     */
    removeVertex(index: number): void;
    /**
     * 设置填充样式
     */
    setFillStyle(options: {
        color?: string;
        opacity?: number;
    }): void;
    /**
     * 设置边框样式
     */
    setStrokeStyle(options: {
        color?: string;
        width?: number;
        dash?: number[];
        opacity?: number;
    }): void;
    /**
     * 设置顶点显示
     */
    setVerticesVisible(visible: boolean, options?: {
        size?: number;
        color?: string;
    }): void;
    /**
     * 设置面积标注
     */
    setAreaLabel(show: boolean, options?: {
        unit?: "m²" | "km²" | "ha" | "acre" | "ft²";
        precision?: number;
    }): void;
    /**
     * 设置周长标注
     */
    setPerimeterLabel(show: boolean, options?: {
        unit?: "m" | "km" | "mi" | "ft";
        precision?: number;
    }): void;
    /**
     * 获取面积
     */
    getArea(unit?: "m²" | "km²" | "ha" | "acre" | "ft²"): number;
    /**
     * 获取周长
     */
    getPerimeter(unit?: "m" | "km" | "mi" | "ft"): number;
    /**
     * 获取多边形类型
     */
    getPolygonType(): "polygon" | "circle" | "rectangle" | "star";
    /**
     * 创建实例
     */
    protected createInstance(config: PolygonDrawingConfig): BaseDrawing<PolygonDrawingConfig, PolygonStyleConfig>;
    /**
     * 从JSON反序列化
     */
    static fromJSON(data: any): PolygonDrawing;
    /**
     * 添加透明度到颜色
     */
    private addOpacityToColor;
}
/**
 * 面标绘工厂
 */
export declare class PolygonDrawingFactory {
    static create(config: PolygonDrawingConfig): PolygonDrawing;
    static getType(): string;
    static getSupportedTypes(): string[];
    /**
     * 创建预设样式的面
     */
    static createPreset(coordinates: Coordinate[] | {
        center: Coordinate;
        radius: number;
    } | {
        topLeft: Coordinate;
        bottomRight: Coordinate;
    }, type: "polygon" | "circle" | "rectangle", preset: "default" | "highlight" | "warning" | "success" | "danger", options?: {
        name?: string;
        text?: string;
        showArea?: boolean;
        showPerimeter?: boolean;
    }): PolygonDrawing;
}
//# sourceMappingURL=PolygonDrawing.d.ts.map