import { type AgCandlestickSeriesItemOptions, type AgOhlcSeriesItemOptions, type AgOhlcSeriesItemType, type FillOptions, type LineDashOptions, type StrokeOptions, _ModuleSupport } from 'ag-charts-community';
import type { AgOhlcSeriesBaseOptions } from 'ag-charts-community';
import { ChartAxisDirection } from 'ag-charts-core';
import { OhlcBaseNode } from './ohlcNode';
import type { OhlcSeriesBaseProperties } from './ohlcSeriesProperties';
interface OhlcCandleStickSeriesStyle extends AgCandlestickSeriesItemOptions, AgOhlcSeriesItemOptions {
}
export interface OhlcNodeDatum extends Omit<_ModuleSupport.CartesianSeriesNodeDatum, 'yKey' | 'yValue'> {
    readonly itemId?: never;
    readonly itemType: AgOhlcSeriesItemType;
    readonly openValue: number;
    readonly closeValue: number;
    readonly highValue?: number;
    readonly lowValue?: number;
    readonly aggregatedValue: number;
    readonly isRising: boolean;
    readonly centerX: number;
    readonly width: number;
    readonly y: number;
    readonly height: number;
    readonly yOpen: number;
    readonly yClose: number;
    readonly crisp: boolean;
    style?: Required<OhlcCandleStickSeriesStyle>;
}
declare class OhlcSeriesNodeEvent<TEvent extends string = _ModuleSupport.SeriesNodeEventTypes> extends _ModuleSupport.SeriesNodeEvent<OhlcNodeDatum, TEvent> {
    readonly xKey?: string;
    readonly openKey?: string;
    readonly closeKey?: string;
    readonly highKey?: string;
    readonly lowKey?: string;
    constructor(type: TEvent, nativeEvent: Event, datum: OhlcNodeDatum, series: OhlcSeriesBase<OhlcSeriesBaseTypes>);
}
interface OhlcSeriesBaseNodeDataContext extends _ModuleSupport.AbstractBarSeriesNodeDataContext<OhlcNodeDatum> {
    styles: Record<'up' | 'down', _ModuleSupport.SeriesNodeStyleContext<OhlcCandleStickSeriesStyle>>;
}
/**
 * Base type interface for OHLC series types.
 * Template parameter TNode allows subclasses to specify their node type.
 */
export interface OhlcSeriesBaseTypes extends _ModuleSupport.AbstractBarSeriesTypes {
    readonly node: OhlcBaseNode<any>;
    readonly options: AgOhlcSeriesBaseOptions;
    readonly properties: OhlcSeriesBaseProperties<this['options']>;
    readonly datum: OhlcNodeDatum;
    readonly label: OhlcNodeDatum;
    readonly context: OhlcSeriesBaseNodeDataContext;
}
export declare abstract class OhlcSeriesBase<TTypes extends OhlcSeriesBaseTypes> extends _ModuleSupport.AbstractBarSeries<TTypes> {
    protected readonly NodeEvent: typeof OhlcSeriesNodeEvent;
    private readonly aggregationManager;
    constructor(moduleCtx: _ModuleSupport.ModuleContext);
    processData(dataController: _ModuleSupport.DataController): Promise<void>;
    private aggregateData;
    private estimateTargetRange;
    getSeriesDomain(direction: ChartAxisDirection): import("ag-charts-core").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;
    /**
     * Creates shared context for node datum creation/update operations.
     * This context is instantiated once and reused across all datum operations
     * to minimize memory allocations. Only caches values that are expensive to
     * compute - cheap property lookups use `this` directly.
     */
    private buildDatumContext;
    /**
     * Validates and prepares state for a single OHLC datum.
     * Mutates ctx.nodeDatumStateScratch with computed values.
     * Returns the scratch object if valid, undefined if invalid.
     */
    private prepareOhlcNodeDatumState;
    /**
     * Creates a skeleton OhlcNodeDatum from prepared state.
     * Takes pre-computed positioning and state from scratch object.
     */
    private createSkeletonNodeDatum;
    /**
     * Updates an existing OhlcNodeDatum in-place for value-only changes.
     * This is more efficient than recreating the entire node when only data values change
     * but the structure (insertions/removals) remains the same.
     */
    private updateNodeDatum;
    /**
     * Handles node creation/update - reuses existing nodes when possible for incremental updates.
     * This method decides whether to update existing nodes in-place or create new ones.
     */
    private upsertNodeDatum;
    createNodeData(): {
        itemId: string;
        nodeData: OhlcNodeDatum[];
        labelData: never[];
        scales: {
            x?: import("ag-charts-core").Scaling | undefined;
            y?: import("ag-charts-core").Scaling | undefined;
            angle?: import("ag-charts-core").Scaling | undefined;
            radius?: import("ag-charts-core").Scaling | undefined;
        };
        groupScale: import("ag-charts-core").Scaling | undefined;
        visible: boolean;
        styles: Record<"up" | "down", Record<_ModuleSupport.HighlightState, Required<AgOhlcSeriesItemOptions> & {
            opacity: number;
        } & Required<AgCandlestickSeriesItemOptions> & {
            opacity: number;
        } & FillOptions & StrokeOptions & LineDashOptions & {
            opacity?: number | undefined;
        }>>;
    } | undefined;
    protected isVertical(): boolean;
    protected isLabelEnabled(): boolean;
    protected resetDatumAnimation(data: _ModuleSupport.CartesianAnimationData<TTypes['node'], OhlcNodeDatum, OhlcNodeDatum, OhlcSeriesBaseNodeDataContext>): void;
    protected updateDatumSelection(opts: {
        nodeData: OhlcNodeDatum[];
        datumSelection: _ModuleSupport.Selection<TTypes['node'], OhlcNodeDatum>;
        seriesIdx: number;
    }): _ModuleSupport.Selection<TTypes["node"], OhlcNodeDatum>;
    protected updateLabelNodes(_opts: {
        labelSelection: _ModuleSupport.Selection<_ModuleSupport.Text, OhlcNodeDatum>;
        seriesIdx: number;
    }): void;
    protected updateLabelSelection(opts: {
        labelData: OhlcNodeDatum[];
        labelSelection: _ModuleSupport.Selection<_ModuleSupport.Text, OhlcNodeDatum>;
        seriesIdx: number;
    }): _ModuleSupport.Selection<_ModuleSupport.Text<any>, OhlcNodeDatum>;
    protected getItemStyle(datumIndex: number | undefined, isHighlight: boolean, highlightState?: _ModuleSupport.HighlightState, itemType?: 'up' | 'down'): Required<AgOhlcSeriesItemOptions> & {
        opacity: number;
    } & Required<AgCandlestickSeriesItemOptions> & {
        opacity: number;
    } & FillOptions & StrokeOptions & LineDashOptions & {
        opacity?: number | undefined;
    };
    private makeItemStylerParams;
    getTooltipContent(datumIndex: number): _ModuleSupport.TooltipContent | undefined;
    computeFocusBounds(opts: _ModuleSupport.PickFocusInputs): _ModuleSupport.BBox | undefined;
}
export {};
