import type { ChartAnimationPhase } from 'ag-charts-core';
import { type Point, StateMachine } from 'ag-charts-core';
import type { AgActiveItemState, FillOptions, StrokeOptions } from 'ag-charts-types';
import type { HighlightNodeDatum } from '../../../core/eventsHub';
import type { ModuleContext } from '../../../module/moduleContext';
import { ColorScale } from '../../../scale/colorScale';
import { BBox } from '../../../scene/bbox';
import type { Node } from '../../../scene/node';
import type { Selection } from '../../../scene/selection';
import type { Path } from '../../../scene/shape/path';
import type { ChartLegendType, GradientLegendDatum } from '../../legend/legendDatum';
import { type PickFocusInputs, type PickFocusOutputs, Series } from '../series';
import type { ISeries, ItemId, SeriesNodeDatum } from '../seriesTypes';
import { HierarchyHighlightState, type HierarchySeriesProperties, toHierarchyHighlightString } from './hierarchySeriesProperties';
type HierarchyAnimationState = 'empty' | 'ready' | 'waiting' | 'clearing';
type HierarchyAnimationEvent<TNode extends Node, TDatum> = {
    update: HierarchyAnimationData<TNode, TDatum>;
    updateData: undefined;
    highlight: Selection<TNode, TDatum>;
    resize: HierarchyAnimationData<TNode, TDatum>;
    clear: HierarchyAnimationData<TNode, TDatum>;
    reset: undefined;
    skip: undefined;
};
export interface HierarchyNodeDatum extends SeriesNodeDatum<number[]> {
}
export interface HierarchyAnimationData<_TNode extends Node, _TNodeClass> {
}
export declare class HierarchyNode<This extends HierarchyNode<This, TDatum> = any, TDatum = Record<string, any>> implements HierarchyNodeDatum, Pick<HighlightNodeDatum, 'colorValue'> {
    readonly series: ISeries<any, any, any>;
    readonly itemId: ItemId;
    readonly datumIndex: number[];
    readonly datum: TDatum | undefined;
    readonly sizeValue: number;
    readonly colorValue: number | undefined;
    readonly sumSize: number;
    readonly depth: number | undefined;
    readonly parent: This | undefined;
    readonly children: This[];
    readonly style: FillOptions & StrokeOptions;
    private static readonly Walk;
    readonly midPoint: Point;
    constructor(series: ISeries<any, any, any>, itemId: ItemId, datumIndex: number[], datum: TDatum | undefined, sizeValue: number, colorValue: number | undefined, sumSize: number, depth: number | undefined, parent: This | undefined, children: This[], style: FillOptions & StrokeOptions);
    get hasChildren(): boolean;
    walk(callback: (node: This | typeof this) => void, order?: number): void;
    find(predicate: (node: This | typeof this) => boolean): This | typeof this | undefined;
    [Symbol.iterator](): Iterator<This>;
}
export declare abstract class HierarchySeries<TNode extends Node, TOpts extends object, TProps extends HierarchySeriesProperties<TOpts>, TNodeClass extends HierarchyNode> extends Series<number[], TNodeClass, TOpts, TProps> {
    protected abstract NodeClass: new (...params: ConstructorParameters<typeof HierarchyNode<any, any>>) => TNodeClass;
    rootNode: TNodeClass | undefined;
    colorDomain: number[];
    maxDepth: number;
    protected colorScale: ColorScale;
    protected animationState: StateMachine<HierarchyAnimationState, HierarchyAnimationEvent<TNode, TNodeClass>>;
    constructor(moduleCtx: ModuleContext);
    resetAnimation(phase: ChartAnimationPhase): void;
    processData(): void;
    protected abstract updateSelections(): void;
    protected abstract updateNodes(): void;
    update({ seriesRect }: {
        seriesRect?: BBox;
    }): void;
    protected resetAllAnimation(_data: HierarchyAnimationData<TNode, TNodeClass>): void;
    protected animateEmptyUpdateReady(data: HierarchyAnimationData<TNode, TNodeClass>): void;
    protected animateWaitingUpdateReady(data: HierarchyAnimationData<TNode, TNodeClass>): void;
    protected animateReadyHighlight(_data: Selection<TNode, TNodeClass>): void;
    protected animateReadyResize(data: HierarchyAnimationData<TNode, TNodeClass>): void;
    protected animateClearingUpdateEmpty(data: HierarchyAnimationData<TNode, TNodeClass>): void;
    protected getAnimationData(): HierarchyAnimationData<TNode, TNodeClass>;
    protected isProcessedDataAnimatable(): boolean;
    protected checkProcessedDataAnimatable(): void;
    findNodeDatum(itemId: AgActiveItemState['itemId']): TNodeClass | undefined;
    dataCount(): number;
    getSeriesDomain(): {
        domain: number[];
    };
    getSeriesRange(): [number, number];
    getLegendData(legendType: ChartLegendType): GradientLegendDatum[];
    protected getDatumIdFromData(node: Pick<TNodeClass, 'datumIndex'>): string;
    protected getDatumId(node: Pick<TNodeClass, 'datumIndex'>): string;
    private removeMeIndexPathForIndex;
    private removeMeIndexForIndexPath;
    protected abstract datumSelection: Selection<any, TNodeClass>;
    protected abstract computeFocusBounds(node: TNode): BBox | Path | undefined;
    pickFocus(opts: PickFocusInputs): PickFocusOutputs | undefined;
    getDatumAriaText(datum: SeriesNodeDatum<number>, description: string): string | undefined;
    getCategoryValue(_datumIndex: number[]): void;
    datumIndexForCategoryValue(_categoryValue: any): number[] | undefined;
    protected getActiveHighlightNode(): TNodeClass | undefined;
    protected getHierarchyHighlightState(isHighlight: boolean, highlightedNode: TNodeClass | undefined, nodeDatum: Pick<TNodeClass, 'datumIndex'>): HierarchyHighlightState;
    protected getHierarchyHighlightStyles<TStyle extends Partial<FillOptions & StrokeOptions & {
        opacity?: number;
    }>>(highlightState: HierarchyHighlightState, highlight: {
        highlightedItem?: TStyle;
        unhighlightedItem?: TStyle;
        highlightedBranch?: TStyle;
        unhighlightedBranch?: TStyle;
    }): TStyle | undefined;
    getHighlightStateString(_datum: HighlightNodeDatum | undefined, isHighlight?: boolean, datumIndex?: number[], _legendItemValues?: string[]): ReturnType<typeof toHierarchyHighlightString>;
    protected abstract getItemStyle(datum: Partial<HierarchyNode>, isLeaf: boolean, isHighlight: boolean): FillOptions & StrokeOptions;
}
export {};
