import type { ChartAnimationPhase, Scale } from 'ag-charts-core';
import { ChartAxisDirection, StateMachine } from 'ag-charts-core';
import type { AgCartesianAxisPosition, AgTimeInterval, AgTimeIntervalUnit } from 'ag-charts-types';
import type { AxisContext } from '../../module/axisContext';
import type { ModuleContext } from '../../module/moduleContext';
import { type FromToDiff } from '../../motion/fromToMotion';
import { BBox } from '../../scene/bbox';
import { TranslatableGroup } from '../../scene/group';
import { Selection } from '../../scene/selection';
import { Line } from '../../scene/shape/line';
import { Rect } from '../../scene/shape/rect';
import type { AxisPrimaryTickCount } from '../../util/secondaryAxisTicks';
import { Caption } from '../caption';
import type { ChartLayout } from '../chartAxis';
import type { AnimationManager } from '../interaction/animationManager';
import type { ScrollbarLayout } from '../layout/layoutManager';
import { Axis, type LabelNodeDatum } from './axis';
import { type AxisFillDatum, type AxisLineDatum, NiceMode, type TickDatum } from './axisUtil';
import { CartesianAxisLabel } from './cartesianAxisLabel';
type AxisAnimationState = 'empty' | 'ready';
type AxisAnimationEvent = {
    reset: undefined;
    resize: undefined;
    update: FromToDiff;
};
interface GeneratedTicks {
    ticks: TickDatum[];
    tickLines: AxisLineDatum[];
    gridLines: AxisLineDatum[];
    gridFills: AxisFillDatum[];
    labels: LabelNodeDatum[];
    spacing: number;
}
export type GridLineStyleTickDatum = Pick<TickDatum, 'index' | 'tickId' | 'translation'>;
export declare abstract class CartesianAxis<S extends Scale<D, number, any> = Scale<any, number, any>, D = any> extends Axis<S, D, GeneratedTicks> {
    static is(value: unknown): value is CartesianAxis<any>;
    thickness?: number;
    maxThicknessRatio: number;
    position: AgCartesianAxisPosition;
    crossAt?: {
        value: D;
        sticky?: boolean;
    };
    readonly crossAxisTranslation: {
        x: number;
        y: number;
    };
    minimumTimeGranularity: AgTimeIntervalUnit | undefined;
    lineRange?: [number, number];
    protected animationManager: AnimationManager;
    protected readonly headingLabelGroup: TranslatableGroup;
    protected readonly lineNodeGroup: TranslatableGroup;
    protected readonly lineNode: Line;
    protected tickLineGroupSelection: Selection<Line, AxisLineDatum>;
    protected gridLineGroupSelection: Selection<Line, AxisLineDatum>;
    protected gridFillGroupSelection: Selection<Rect<any>, AxisFillDatum>;
    private readonly tempText;
    private readonly tempCaption;
    protected readonly animationState: StateMachine<AxisAnimationState, AxisAnimationEvent>;
    protected get horizontal(): boolean;
    constructor(moduleCtx: ModuleContext, scale: S);
    protected onGridVisibilityChange(): void;
    resetAnimation(phase: ChartAnimationPhase): void;
    get direction(): ChartAxisDirection.X | ChartAxisDirection.Y;
    createAxisContext(): AxisContext;
    protected createLabel(): CartesianAxisLabel;
    protected updateDirection(): void;
    calculateLayout(primaryTickCount?: AxisPrimaryTickCount, chartLayout?: ChartLayout): {
        primaryTickCount?: AxisPrimaryTickCount | undefined;
        bbox?: BBox | undefined;
    };
    layoutCrossLines(): void;
    calculateTickLayout(domain: D[], niceMode: NiceMode[], visibleRange: [number, number], initialPrimaryTickCount?: AxisPrimaryTickCount): {
        niceDomain: D[];
        tickDomain: D[];
        ticks: D[];
        rawTickCount: number | undefined;
        fractionDigits: number;
        timeInterval: AgTimeInterval | AgTimeIntervalUnit | undefined;
        bbox: BBox;
        layout: GeneratedTicks;
    };
    protected calculateGridLines(ticks: GridLineStyleTickDatum[], p1: number, p2: number): AxisLineDatum[];
    protected calculateGridLine({ index: tickIndex, tickId, translation: offset }: GridLineStyleTickDatum, _index: number, p1: number, p2: number, _ticks: GridLineStyleTickDatum[]): AxisLineDatum;
    protected calculateGridFills(ticks: GridLineStyleTickDatum[], p1: number, p2: number): AxisFillDatum[];
    protected calculateGridFill({ tickId, translation }: Pick<GridLineStyleTickDatum, 'tickId' | 'translation'>, index: number, gridFillIndex: number, p1: number, p2: number, ticks: GridLineStyleTickDatum[]): AxisFillDatum;
    protected calculateTickLines(ticks: TickDatum[], direction: number, scrollbarThickness?: number): AxisLineDatum[];
    protected calculateTickLine({ isPrimary, tickId, translation: offset }: Pick<TickDatum, 'isPrimary' | 'tickId' | 'translation'>, _index: number, direction: number, _ticks: TickDatum[], scrollbarThickness?: number): AxisLineDatum;
    update(): void;
    private getAxisTransform;
    protected getLayoutTranslation(): {
        x: number;
        y: number;
    };
    getLayoutState(): {
        position: AgCartesianAxisPosition;
        id: string;
        rect: BBox;
        translation: {
            x: number;
            y: number;
        };
        gridPadding: number;
        seriesAreaPadding: number;
        tickSize: number;
        labelThickness?: number | undefined;
        scrollbar?: {
            enabled: boolean;
            placement: import("ag-charts-types").AgScrollbarPlacement;
            spacing: number;
            thickness: number;
            offset: number;
        } | undefined;
        label: {
            fractionDigits: number;
            spacing: number;
            format?: string | Record<string, string> | undefined;
        };
        direction: ChartAxisDirection;
        domain: any[];
        scale: Scale<any, any, number | AgTimeInterval | AgTimeIntervalUnit>;
    };
    protected updatePosition(): void;
    setAxisVisible(visible: boolean): void;
    private getAxisLineCoordinates;
    private getTickLineBBox;
    protected lineNodeBBox(): BBox;
    protected titleBBox(domain: D[], spacing: number): BBox;
    protected getScrollbarThickness(scrollbar?: ScrollbarLayout): number;
    protected resolveScrollbarLayout(scrollbar: ScrollbarLayout | undefined, labelThickness: number): (ScrollbarLayout & {
        offset: number;
    }) | undefined;
    protected applyScrollbarLayout(boxes: BBox[], labelThickness: number, scrollbar: ScrollbarLayout | undefined): {
        spacing: number;
        scrollbarLayout: (ScrollbarLayout & {
            offset: number;
        }) | undefined;
    };
    private measureAxisLayout;
    protected titleProps(caption: Caption, domain: D[], spacing: number): {
        visible: boolean;
        text: import("ag-charts-types").TextOrSegments | undefined;
        textBaseline: "top" | "bottom";
        x: number;
        y: number;
        rotationCenterX: number;
        rotationCenterY: number;
        rotation: number;
    };
    private getTickLabelProps;
    protected updateSelections(): void;
    protected updateGridLines(): void;
    protected updateGridFills(): void;
    protected updateTickLines(): void;
    protected updateTitle(domain: D[], spacing: number): void;
    protected updateLabels(): void;
    private animateReadyUpdate;
    protected resetSelectionNodes(): void;
}
export {};
