import type { AgWaterfallSeriesItemType, AgWaterfallSeriesOptions, AgWaterfallSeriesStyle, TextOrSegments } from 'ag-charts-community';
import { _ModuleSupport } from 'ag-charts-community';
import { ChartAxisDirection, type DomainWithMetadata, type Point } from 'ag-charts-core';
import { WaterfallSeriesProperties } from './waterfallSeriesProperties';
type WaterfallNodeLabelDatum = Readonly<Point> & {
    readonly text: TextOrSegments;
    readonly textAlign: CanvasTextAlign;
    readonly textBaseline: CanvasTextBaseline;
};
type WaterfallNodePointDatum = _ModuleSupport.DataModelSeriesNodeDatum['point'] & {
    readonly x2: number;
    readonly y2: number;
};
interface WaterfallNodeDatum extends _ModuleSupport.CartesianSeriesNodeDatum, Readonly<Point> {
    readonly index: number;
    readonly itemId?: never;
    readonly itemType: AgWaterfallSeriesItemType;
    readonly cumulativeValue: number;
    readonly width: number;
    readonly height: number;
    readonly label: WaterfallNodeLabelDatum;
    readonly crisp: boolean;
    readonly clipBBox?: _ModuleSupport.BBox;
    readonly opacity?: number;
    style?: Required<AgWaterfallSeriesStyle>;
}
interface WaterfallContext extends _ModuleSupport.AbstractBarSeriesNodeDataContext<WaterfallNodeDatum> {
    pointData?: WaterfallNodePointDatum[];
    styles: Record<AgWaterfallSeriesItemType, _ModuleSupport.SeriesNodeStyleContext<Required<AgWaterfallSeriesStyle>>>;
}
/** Internal context for createNodeData() - caches expensive lookups */
interface WaterfallSeriesNodeDatumContext extends _ModuleSupport.CartesianCreateNodeDataContext<WaterfallNodeDatum> {
    readonly categoryAxis: _ModuleSupport.ChartAxis;
    readonly valueAxis: _ModuleSupport.ChartAxis;
    readonly barAlongX: boolean;
    readonly barWidth: number;
    readonly categoryAxisReversed: boolean;
    readonly valueAxisReversed: boolean;
    readonly crisp: boolean;
    readonly yKey: string;
    readonly yName: string | undefined;
    readonly lineStrokeWidth: number;
    readonly yDomain: number[];
    readonly yRawValues: (number | undefined)[];
    readonly totalTypeValues: (AgWaterfallSeriesItemType | undefined)[];
    readonly yCurrValues: number[];
    readonly yPrevValues: number[];
    readonly yCurrTotalValues: number[];
    pointData: WaterfallNodePointDatum[];
}
/**
 * Consolidated type interface for WaterfallSeries.
 * Defines all type parameters in one place for the series.
 */
interface WaterfallSeriesTypes extends _ModuleSupport.AbstractBarSeriesTypes {
    readonly node: _ModuleSupport.Rect<WaterfallNodeDatum>;
    readonly options: AgWaterfallSeriesOptions;
    readonly properties: WaterfallSeriesProperties;
    readonly datum: WaterfallNodeDatum;
    readonly label: WaterfallNodeDatum;
    readonly context: WaterfallContext;
    readonly stackContext: never;
    readonly createNodeDataContext: WaterfallSeriesNodeDatumContext;
}
type WaterfallAnimationData = _ModuleSupport.AbstractBarSeriesAnimationData<WaterfallSeriesTypes>;
export declare class WaterfallSeries extends _ModuleSupport.AbstractBarSeries<WaterfallSeriesTypes> {
    static readonly className = "WaterfallSeries";
    static readonly type: "waterfall";
    properties: WaterfallSeriesProperties;
    constructor(moduleCtx: _ModuleSupport.ModuleContext);
    private readonly seriesItemTypes;
    processData(dataController: _ModuleSupport.DataController): Promise<void>;
    getSeriesDomain(direction: ChartAxisDirection): DomainWithMetadata<any>;
    getSeriesRange(): [number, number];
    protected populateNodeData(ctx: WaterfallSeriesNodeDatumContext): void;
    protected finalizeNodeData(ctx: WaterfallSeriesNodeDatumContext): void;
    protected initializeResult(ctx: WaterfallSeriesNodeDatumContext): WaterfallContext;
    protected assembleResult(ctx: WaterfallSeriesNodeDatumContext, result: WaterfallContext): WaterfallContext;
    protected createNodeDatumContext(xAxis: _ModuleSupport.ChartAxis, yAxis: _ModuleSupport.ChartAxis): WaterfallSeriesNodeDatumContext | undefined;
    private computeWaterfallValues;
    private computeDisplayValue;
    /**
     * Creates a skeleton WaterfallNodeDatum with minimal required fields.
     * The node will be populated by updateNodeDatum.
     */
    private createSkeletonNodeDatum;
    /**
     * Updates an existing WaterfallNodeDatum in-place.
     * This is more efficient than recreating the entire node when only data values change.
     */
    private updateNodeDatum;
    /**
     * Creates a WaterfallNodeDatum for a single data point.
     * Creates a skeleton node and uses updateNodeDatum to populate it.
     */
    private createNodeDatum;
    private createPointDatum;
    private updateSeriesItemTypes;
    private isSubtotal;
    private isTotal;
    protected nodeFactory(): _ModuleSupport.Rect<any>;
    private getSeriesItemType;
    private getItemConfig;
    protected updateDatumSelection(opts: {
        nodeData: WaterfallNodeDatum[];
        datumSelection: _ModuleSupport.Selection<_ModuleSupport.Rect, WaterfallNodeDatum>;
    }): _ModuleSupport.Selection<_ModuleSupport.Rect<any>, WaterfallNodeDatum>;
    private getItemStyle;
    private makeItemStylerParams;
    protected updateDatumStyles({ datumSelection, isHighlight, }: {
        datumSelection: _ModuleSupport.Selection<_ModuleSupport.Rect, WaterfallNodeDatum>;
        isHighlight: boolean;
    }): void;
    protected updateDatumNodes({ datumSelection, isHighlight, }: {
        datumSelection: _ModuleSupport.Selection<_ModuleSupport.Rect, WaterfallNodeDatum>;
        isHighlight: boolean;
    }): void;
    protected updateLabelSelection(opts: {
        labelData: WaterfallNodeDatum[];
        labelSelection: _ModuleSupport.Selection<_ModuleSupport.Text, WaterfallNodeDatum>;
    }): _ModuleSupport.Selection<_ModuleSupport.Text<any>, WaterfallNodeDatum>;
    protected updateLabelNodes({ labelSelection, isHighlight, }: {
        labelSelection: _ModuleSupport.Selection<_ModuleSupport.Text, WaterfallNodeDatum>;
        isHighlight: boolean;
    }): void;
    getTooltipContent(datumIndex: number): _ModuleSupport.TooltipContent | undefined;
    private legendItemSymbol;
    getLegendData(legendType: _ModuleSupport.ChartLegendType): _ModuleSupport.CategoryLegendDatum[];
    protected toggleSeriesItem(): void;
    protected resetDatumAnimation(data: WaterfallAnimationData): void;
    animateEmptyUpdateReady(opts: WaterfallAnimationData): void;
    protected animateConnectorLinesHorizontal(opts: WaterfallAnimationData): void;
    protected animateConnectorLinesVertical(opts: WaterfallAnimationData): void;
    animateReadyResize(data: WaterfallAnimationData): void;
    protected updatePaths(opts: {
        contextData: WaterfallContext;
        paths: _ModuleSupport.Path[];
    }): void;
    resetConnectorLinesPath({ contextData, paths, }: {
        contextData: WaterfallContext;
        paths: Array<_ModuleSupport.Path>;
    }): void;
    protected updateLineNode(lineNode: _ModuleSupport.Path): void;
    protected isLabelEnabled(): boolean;
    protected computeFocusBounds({ datumIndex }: _ModuleSupport.PickFocusInputs): _ModuleSupport.BBox | undefined;
    protected hasItemStylers(): boolean;
}
export {};
