import type { DomainWithMetadata } from 'ag-charts-core';
import { ChartAxisDirection } from 'ag-charts-core';
import { type AgDrawingMode, type AgLineSeriesOptions, type AgLineSeriesStylerParams, type AgLineSeriesStylerResult, type AgSeriesMarkerStyle } from 'ag-charts-types';
import type { ModuleContext } from '../../../module/moduleContext';
import type { BBox } from '../../../scene/bbox';
import type { Selection } from '../../../scene/selection';
import type { Path } from '../../../scene/shape/path';
import type { SegmentedPath } from '../../../scene/shape/segmentedPath';
import type { Text } from '../../../scene/shape/text';
import type { ChartAxis } from '../../chartAxis';
import type { DataController } from '../../data/dataController';
import type { CategoryLegendDatum, ChartLegendType } from '../../legend/legendDatum';
import { Marker } from '../../marker/marker';
import { type TooltipContent } from '../../tooltip/tooltip';
import { type PickFocusInputs } from '../series';
import { HighlightState } from '../seriesProperties';
import { CartesianSeries } from './cartesianSeries';
import type { CartesianAnimationDataOf, CartesianSeriesTypes } from './cartesianSeriesTypes';
import { LineSeriesProperties } from './lineSeriesProperties';
import { type LineNodeDatum, type LineSeriesDatumContext, type LineSeriesNodeDataContext } from './lineUtil';
/**
 * Consolidated type interface for LineSeries.
 * Defines all type parameters in one place for the series.
 */
interface LineSeriesTypes extends CartesianSeriesTypes {
    readonly node: Marker;
    readonly options: AgLineSeriesOptions;
    readonly properties: LineSeriesProperties;
    readonly datum: LineNodeDatum;
    readonly label: LineNodeDatum;
    readonly context: LineSeriesNodeDataContext;
    readonly stackContext: never;
    readonly createNodeDataContext: LineSeriesDatumContext;
}
type LineAnimationData = CartesianAnimationDataOf<LineSeriesTypes>;
export declare class LineSeries extends CartesianSeries<LineSeriesTypes> {
    static readonly className = "LineSeries";
    static readonly type: "line";
    properties: LineSeriesProperties;
    private readonly aggregationManager;
    get pickModeAxis(): "main" | "main-category";
    constructor(moduleCtx: ModuleContext);
    private isNormalized;
    renderToOffscreenCanvas(): boolean;
    processData(dataController: DataController): Promise<void>;
    private yValueKey;
    private yCumulativeKey;
    xCoordinateRange(xValue: any, pixelSize: number): [number, number];
    yCoordinateRange(yValues: any[], pixelSize: number): [number, number];
    getSeriesDomain(direction: ChartAxisDirection): DomainWithMetadata<any>;
    getSeriesRange(_direction: ChartAxisDirection, visibleRange: [number, number]): [number, number];
    getZoomRangeFittingItems(xVisibleRange: [number, number], yVisibleRange: [number, number] | undefined, minVisibleItems: number): {
        x: [number, number];
        y: [number, number] | undefined;
    } | undefined;
    getVisibleItems(xVisibleRange: [number, number], yVisibleRange: [number, number] | undefined, minVisibleItems: number): number;
    private aggregateData;
    private estimateTargetRange;
    /**
     * Creates the context object for efficient node datum creation.
     * Caches expensive-to-compute values that are reused across all datum iterations
     * to minimize memory allocations. Only caches values that are expensive to
     * compute - cheap property lookups use `this` directly.
     */
    protected createNodeDatumContext(xAxis: ChartAxis, yAxis: ChartAxis): LineSeriesDatumContext | undefined;
    /**
     * Processes a single datum and updates the context's nodes and spanPoints arrays.
     * Uses the scratch object to avoid per-iteration allocations.
     */
    private handleDatum;
    /**
     * Updates span points array based on current scratch values.
     */
    private updateSpanPoints;
    /**
     * Populates node data by iterating over the visible range.
     */
    protected populateNodeData(ctx: LineSeriesDatumContext): void;
    /**
     * Creates the initial result context object.
     * Note: strokeData and segments are computed in assembleResult, but we need valid defaults
     * for the early return case (when !this.visible).
     */
    protected initializeResult(ctx: LineSeriesDatumContext): LineSeriesNodeDataContext;
    /**
     * Assembles the final result by computing strokeData, crossFiltering, and segments.
     */
    protected assembleResult(ctx: LineSeriesDatumContext, result: LineSeriesNodeDataContext): LineSeriesNodeDataContext;
    protected isPathOrSelectionDirty(): boolean;
    protected updatePathNodes(opts: {
        paths: SegmentedPath[];
        visible: boolean;
        animationEnabled: boolean;
    }): void;
    protected updateDatumSelection(opts: {
        nodeData: LineNodeDatum[];
        datumSelection: Selection<Marker, LineNodeDatum>;
    }): Selection<Marker, LineNodeDatum>;
    protected updateDatumStyles(opts: {
        datumSelection: Selection<Marker, LineNodeDatum>;
        isHighlight: boolean;
    }): void;
    protected updateDatumNodes(opts: {
        datumSelection: Selection<Marker, LineNodeDatum>;
        isHighlight: boolean;
        drawingMode: AgDrawingMode;
    }): void;
    protected updateLabelSelection(opts: {
        labelData: LineNodeDatum[];
        labelSelection: Selection<Text, LineNodeDatum>;
    }): Selection<Text<any>, LineNodeDatum>;
    protected updateLabelNodes(opts: {
        labelSelection: Selection<Text, LineNodeDatum>;
        isHighlight?: boolean;
    }): void;
    makeStylerParams(highlightStateEnum?: HighlightState): AgLineSeriesStylerParams<unknown, unknown>;
    private makeItemStylerParams;
    private makeLabelFormatterParams;
    getTooltipContent(datumIndex: number): TooltipContent | undefined;
    private legendItemSymbol;
    getLegendData(legendType: ChartLegendType): CategoryLegendDatum[];
    protected updatePaths(opts: {
        contextData: LineSeriesNodeDataContext;
        paths: Path[];
    }): void;
    private updateLinePaths;
    protected resetDatumAnimation(data: LineAnimationData): void;
    protected animateEmptyUpdateReady(animationData: LineAnimationData): void;
    protected animateReadyResize(animationData: LineAnimationData): void;
    protected animateWaitingUpdateReady(animationData: LineAnimationData): void;
    protected isLabelEnabled(): boolean;
    getBandScalePadding(): {
        inner: number;
        outer: number;
    };
    protected nodeFactory(): Marker;
    getStyle(highlightState?: HighlightState): Required<AgLineSeriesStylerResult> & {
        marker: Required<AgSeriesMarkerStyle>;
    };
    getFormattedMarkerStyle(datum: LineNodeDatum): AgSeriesMarkerStyle & {
        size: number;
    };
    protected computeFocusBounds(opts: PickFocusInputs): BBox | undefined;
    protected hasItemStylers(): boolean;
}
export {};
