import type { IColorRamp } from '@antv/l7';
import { BlendType, ILayer, ILayerConfig, Scene } from './common';
import { LabelOptions } from './label';
import { AnimateAttr, ColorAttr, StateAttribute, ShapeAttr, SizeAttr, TextureAttr } from './attr';
import { SourceOptions, Source } from './map';
/**
 * 图层混合配置
 */
export type LayerBlend = keyof typeof BlendType;
/**
 * 图表图层的基础配置
 */
export interface PlotLayerOptions {
    name?: string;
    zIndex?: number;
    visible?: boolean;
    minZoom?: number;
    maxZoom?: number;
    pickingBuffer?: number;
    autoFit?: boolean;
    blend?: LayerBlend;
}
/**
 * 点图层 图层样式
 */
export type PointLayerStyleOptions = {
    opacity?: number;
    strokeWidth?: number;
    stroke?: string;
};
/**
 * 点图层 图形形状
 */
export type PointShape2d = 'circle' | 'square' | 'hexagon' | 'triangle' | 'pentagon' | 'octogon' | 'hexagram' | 'rhombus' | 'vesica' | 'dot';
export type PointShape3d = 'cylinder' | 'triangleColumn' | 'hexagonColumn' | 'squareColumn';
export type PointShape = PointShape2d | PointShape3d;
/**
 * 点图层基础配置
 */
export interface PointLayerConfig extends Partial<PlotLayerOptions> {
    /**
     * 图形形状
     */
    shape?: ShapeAttr<PointShape | string>;
    /**
     * 图形颜色
     */
    color?: ColorAttr;
    /**
     * 图形大小
     */
    size?: SizeAttr;
    /**
     * 图层样式
     */
    style?: PointLayerStyleOptions;
    /**
     * animation 配置
     */
    animate?: AnimateAttr;
    /**
     * 交互反馈
     */
    state?: StateAttribute;
}
/**
 * 文字图层基础配置
 */
export interface TextLayerConfig extends Partial<PlotLayerOptions & LabelOptions> {
    color?: ColorAttr;
    size?: SizeAttr;
    state?: StateAttribute;
}
/**
 * 热力普通图层 色带
 */
export type ColorRamp = {
    color: string;
    position: number;
}[];
/**
 * 热力普通图层 图层样式
 */
export type HeatmapLayerStyleOptions = {
    opacity?: number;
    angle?: number;
    intensity: number;
    radius: number;
    colorsRamp: ColorRamp;
    rampColors?: IColorRamp;
};
/**
 * 热力网格图/蜂窝图层 图层样式
 */
export type GridHeatmapLayerStyleOptions = {
    opacity?: number;
    angle?: number;
    coverage?: number;
};
/**
 * 热力图层 图形形状
 */
export type HeatmapShape2d = 'circle' | 'square' | 'hexagon' | 'triangle';
export type HeatmapShape3d = 'cylinder' | 'squareColumn' | 'hexagonColumn' | 'triangleColumn';
export type HeatmapShape = 'heatmap' | 'heatmap3D' | HeatmapShape2d | HeatmapShape3d;
/**
 * 热力图层基础配置
 */
export interface HeatmapLayerConfig extends Partial<PlotLayerOptions> {
    /**
     * 图形形状
     */
    shape?: HeatmapShape;
    /**
     * 图形颜色
     */
    color?: ColorAttr;
    /**
     * 图形大小
     */
    size?: SizeAttr;
    /**
     * 图层样式
     */
    style?: HeatmapLayerStyleOptions | GridHeatmapLayerStyleOptions;
    /**
     * 交互反馈
     */
    state?: StateAttribute;
}
/**
 * 线图层 图形形状
 */
export type ArcLineShape = 'arc' | 'arc3d' | 'greatcircle';
export type LineShape = 'line' | ArcLineShape;
/**
 * 线图层 线类型
 */
export declare enum LineStyleType {
    'solid' = 0,
    'dash' = 1
}
/**
 * 线图层 图层样式
 */
export type LinesLayerStyleOptions = {
    opacity?: number | [string, (data: any) => number] | [string, [number, number]];
    lineType?: keyof typeof LineStyleType;
    dashArray?: [number, number];
    segmentNumber?: number;
    sourceColor?: string;
    targetColor?: string;
    forward?: boolean;
    thetaOffset?: number;
    lineTexture?: boolean;
    iconStep?: number;
    textureBlend?: string;
};
/**
 * 线图层基础配置
 */
export interface LinesLayerConfig extends Partial<PlotLayerOptions> {
    /**
     * 图形形状
     */
    shape?: ShapeAttr<LineShape>;
    /**
     * 图形颜色
     */
    color?: ColorAttr;
    /**
     * 图形大小
     */
    size?: SizeAttr;
    /**
     * 图层样式
     */
    style?: LinesLayerStyleOptions;
    /**
     * animation 配置
     */
    animate?: AnimateAttr;
    /**
     * 交互反馈
     */
    state?: StateAttribute;
    /**
     * 纹理贴图
     */
    texture?: TextureAttr;
}
/**
 * 面图层 图形形状
 */
export type PolygonShape = 'fill' | 'line' | 'extrude';
/**
 * 面图层 图层样式
 */
export type PolygonLayerStyleOptions = {
    opacity?: number;
};
/**
 * 面图层基础配置
 */
export interface PolygonLayerConfig extends Partial<PlotLayerOptions> {
    /**
     * 图形形状
     */
    shape?: PolygonShape;
    /**
     * 图形颜色
     */
    color?: ColorAttr;
    /**
     * 图形大小
     */
    size?: SizeAttr;
    /**
     * 图层样式
     */
    style?: PolygonLayerStyleOptions;
    /**
     * 交互反馈
     */
    state?: StateAttribute;
}
/**
 * L7Plot 内置图层的基类接口
 */
export interface IPlotLayer<T extends PlotLayerOptions = PlotLayerOptions> {
    name: string;
    type: string;
    layer: ILayer;
    interaction: boolean;
    options: PlotLayerOptions;
    pickLayerConfig(params: T): Partial<ILayerConfig>;
    addTo(scene: Scene): void;
    remove(scene: Scene): void;
    update(options: Partial<T>): void;
    updateOption(options: Partial<T>): void;
    changeData(source: SourceOptions | Source): void;
    render(): void;
    show(): void;
    hide(): void;
    toggleVisible(): void;
    fitBounds(fitBoundsOptions?: unknown): void;
    on(name: string, callback: (...args: any[]) => void): this;
    once(name: string, callback: (...args: any[]) => void): this;
    off(name: string, callback: (...args: any[]) => void): this;
}
/**
 * L7Plot 内置图层类型
 */
export declare enum LayerType {
    TextLayer = "textLayer",
    DotLayer = "dotLayer",
    IconLayer = "iconLayer",
    DotDensity = "dotDensityLayer",
    ColumnLayer = "columnLayer",
    HeatmapLayer = "heatmapLayer",
    GridLayer = "gridLayer",
    HexbinLayer = "hexbinLayer",
    LinesLayer = "linesLayer",
    PathLayer = "pathLayer",
    ArcLayer = "arcLayer",
    AreaLayer = "areaLayer",
    PrismLayer = "prismLayer"
}
