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

/**
 * 带文字的点标绘样式配置
 */
export interface PointWithTextStyleConfig extends Omit<DrawingStyleConfig, "pointStyle"> {
    pointStyle: "circle" | "square" | "triangle" | "star" | "cross" | "x" | "icon";
    pointSize?: number;
    pointColor?: string;
    pointStrokeColor?: string;
    pointStrokeWidth?: number;
    pointOpacity?: number;
    iconUrl?: string;
    iconScale?: number;
    iconRotation?: number;
    iconOpacity?: number;
    iconAnchor?: [number, number];
    iconOffset?: [number, number];
    textContent: string;
    fontSize?: number;
    fontFamily?: string;
    fontWeight?: "normal" | "bold" | "bolder" | "lighter";
    fontStyle?: "normal" | "italic" | "oblique";
    textColor?: string;
    textAlign?: "left" | "center" | "right" | "start" | "end";
    textBaseline?: "top" | "middle" | "bottom" | "alphabetic" | "hanging";
    textOffsetX?: number;
    textOffsetY?: number;
    textRotation?: number;
    textScale?: number;
    textPosition?: "top" | "bottom" | "left" | "right" | "center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
    textBackgroundColor?: string;
    textBackgroundOpacity?: number;
    textBackgroundPadding?: [number, number, number, number];
    textStrokeColor?: string;
    textStrokeWidth?: number;
}
/**
 * 带文字的点标绘配置
 */
export interface PointWithTextDrawingConfig extends Omit<DrawingConfig, "style"> {
    type: "point-with-text";
    coordinates?: Coordinate | Coordinate[] | Coordinate[][] | {
        center: Coordinate;
        radius: number;
    } | {
        topLeft: Coordinate;
        bottomRight: Coordinate;
    } | any;
    style?: PointWithTextStyleConfig;
}
/**
 * 带文字的点标绘类
 * 在点标绘的基础上添加文字标注功能
 */
export declare class PointWithTextDrawing extends BaseDrawing<PointWithTextDrawingConfig, PointWithTextStyleConfig> {
    constructor(config: PointWithTextDrawingConfig);
    /**
     * 创建要素
     */
    protected createFeature(): void;
    /**
     * 创建样式
     */
    protected createStyle(): Style;
    /**
     * 创建点样式
     */
    private createPointStyle;
    /**
     * 创建几何形状样式
     */
    private createGeometryStyle;
    /**
     * 创建文字样式
     */
    private createTextStyle;
    /**
     * 计算文字偏移位置
     */
    private calculateTextOffset;
    /**
     * 获取字体字符串
     */
    private getFontString;
    /**
     * 更新要素几何
     */
    protected updateFeatureGeometry(): void;
    /**
     * 更新选中样式
     */
    protected updateSelectionStyle(): void;
    /**
     * 设置坐标
     */
    setCoordinates(coordinates: Coordinate): void;
    /**
     * 获取坐标
     */
    getCoordinates(): Coordinate | undefined;
    /**
     * 设置点样式
     */
    setPointStyle(options: {
        style?: "circle" | "square" | "triangle" | "star" | "cross" | "x" | "icon";
        size?: number;
        color?: string;
        strokeColor?: string;
        strokeWidth?: number;
        opacity?: number;
    }): void;
    /**
     * 设置图标
     */
    setIcon(options: {
        url?: string;
        scale?: number;
        rotation?: number;
        opacity?: number;
        anchor?: [number, number];
        offset?: [number, number];
    }): void;
    /**
     * 设置文字内容
     */
    setText(text: string): void;
    /**
     * 获取文字内容
     */
    getText(): string;
    /**
     * 设置文字样式
     */
    setTextStyle(options: {
        fontSize?: number;
        fontFamily?: string;
        fontWeight?: "normal" | "bold" | "bolder" | "lighter";
        fontStyle?: "normal" | "italic" | "oblique";
        color?: string;
        position?: "top" | "bottom" | "left" | "right" | "center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
    }): void;
    /**
     * 设置文字位置
     */
    setTextPosition(position: "top" | "bottom" | "left" | "right" | "center" | "top-left" | "top-right" | "bottom-left" | "bottom-right"): void;
    /**
     * 设置文字偏移
     */
    setTextOffset(offsetX: number, offsetY: number): void;
    /**
     * 创建实例
     */
    protected createInstance(config: PointWithTextDrawingConfig): BaseDrawing<PointWithTextDrawingConfig, PointWithTextStyleConfig>;
    /**
     * 从JSON数据创建带文字的点标绘
     */
    static fromJSON(data: any): PointWithTextDrawing;
    /**
     * 为颜色添加透明度
     */
    private addOpacityToColor;
}
/**
 * 带文字的点标绘工厂类
 */
export declare class PointWithTextDrawingFactory {
    static create(config: PointWithTextDrawingConfig): PointWithTextDrawing;
    static getType(): string;
    static getSupportedTypes(): string[];
    /**
     * 创建预设带文字的点标绘
     */
    static createPreset(coordinates: Coordinate, text: string, preset: "marker" | "location" | "warning" | "info" | "success" | "danger", options?: {
        name?: string;
        pointSize?: number;
        textPosition?: "top" | "bottom" | "left" | "right" | "center";
        fontSize?: number;
    }): PointWithTextDrawing;
}
//# sourceMappingURL=PointWithTextDrawing.d.ts.map