import type { Scaling } from 'ag-charts-core';
import { ChartAxisDirection, type Point } from 'ag-charts-core';
import type { Direction } from 'ag-charts-types';
import type { QuadtreeNearest } from '../../../scene/util/quadtree';
import type { ChartAxis } from '../../chartAxis';
import type { SeriesNodePickMatch } from '../series';
import type { SeriesNodeDatum } from '../seriesTypes';
import { type CartesianAnimationData, CartesianSeries, CartesianSeriesProperties } from './cartesianSeries';
import type { CartesianSeriesNodeDataContext, CartesianSeriesNodeDatum, CartesianSeriesTypes, ContextOf, DatumOf, LabelOf, NodeOf } from './cartesianSeriesTypes';
import { type QuadtreeCompatibleNode } from './quadtreeUtil';
export declare abstract class AbstractBarSeriesProperties<T extends object> extends CartesianSeriesProperties<T> {
    direction: Direction;
    width?: number;
    widthRatio?: number;
}
export interface AbstractBarSeriesNodeDataContext<TDatum extends CartesianSeriesNodeDatum, TLabel extends SeriesNodeDatum<number> = TDatum> extends CartesianSeriesNodeDataContext<TDatum, TLabel> {
    groupScale: Scaling | undefined;
}
/**
 * Type constraint for series extending AbstractBarSeries.
 * The node type must be compatible with quadtree hit testing.
 * The properties type must include direction for bar orientation.
 */
export interface AbstractBarSeriesTypes extends CartesianSeriesTypes {
    readonly node: QuadtreeCompatibleNode;
    readonly properties: AbstractBarSeriesProperties<this['options']>;
    readonly context: AbstractBarSeriesNodeDataContext<this['datum'], this['label']>;
}
export type AbstractBarSeriesAnimationData<TTypes extends AbstractBarSeriesTypes> = CartesianAnimationData<NodeOf<TTypes>, DatumOf<TTypes>, LabelOf<TTypes>, ContextOf<TTypes>>;
export declare abstract class AbstractBarSeries<TTypes extends AbstractBarSeriesTypes> extends CartesianSeries<TTypes> {
    protected smallestDataInterval?: number;
    protected largestDataInterval?: number;
    protected padBandExtent(keys: any[], alignStart?: boolean): [] | [number, number];
    getBandScalePadding(): {
        inner: number;
        outer: number;
    };
    shouldFlipXY(): boolean;
    protected isVertical(): boolean;
    protected getBarDirection(): ChartAxisDirection.X | ChartAxisDirection.Y;
    protected getCategoryDirection(): ChartAxisDirection.X | ChartAxisDirection.Y;
    protected getValueAxis(): ChartAxis | undefined;
    protected getCategoryAxis(): ChartAxis | undefined;
    getMinimumRangeSeries(ranges: number[]): void;
    getMinimumRangeChart(ranges: number[]): number;
    /**
     * Override to use bar-specific axis resolution (category/value vs X/Y).
     * Bar series can be horizontal or vertical, so we use getCategoryAxis/getValueAxis.
     */
    protected validateCreateNodeDataPreconditions(): {
        xAxis: ChartAxis;
        yAxis: ChartAxis;
    } | undefined;
    protected getBandwidth(xAxis: ChartAxis, minWidth?: 1 | 0): number | undefined;
    xCoordinateRange(xValue: any): [number, number];
    yCoordinateRange(yValues: any[]): [number, number];
    protected getBarDimensions(): {
        groupOffset: number;
        barOffset: number;
        barWidth: number;
    };
    private getGroupOffset;
    private getBarOffset;
    private getBarWidth;
    private getGroupScaleRangeWidth;
    resolveKeyDirection(direction: ChartAxisDirection): ChartAxisDirection;
    protected initQuadTree(quadtree: QuadtreeNearest<DatumOf<TTypes>>): void;
    protected pickNodeClosestDatum(point: Point): SeriesNodePickMatch | undefined;
}
