import { ChartAxisDirection, ChartUpdateType, type EventListener } from 'ag-charts-core';
import type { ISeries } from './series/seriesTypes';
export type UpdateCallback = (type: ChartUpdateType, opts?: UpdateOpts) => void;
export interface UpdateCompleteEvent {
    readonly type: 'update-complete';
    readonly apiUpdate: boolean;
    readonly wasShortcut: boolean;
}
export interface PreDomUpdateEvent {
    readonly type: 'pre-dom-update';
}
export interface PreSeriesUpdateEvent {
    readonly type: 'pre-series-update';
    readonly requiredRangeRatio: number;
    readonly requiredRangeDirection: ChartAxisDirection;
}
export interface PreSceneRenderEvent {
    readonly type: 'pre-scene-render';
}
export interface ProcessDataEvent {
    readonly type: 'process-data';
    readonly series: {
        shouldFlipXY?: boolean;
    };
}
export interface UpdateOpts {
    forceNodeDataRefresh?: boolean;
    skipAnimations?: boolean;
    newAnimationBatch?: boolean;
    seriesToUpdate?: Iterable<ISeries<any, any, any>>;
    backOffMs?: number;
    apiUpdate?: boolean;
    clearCallbackCache?: boolean;
}
interface EventMap {
    'update-complete': UpdateCompleteEvent;
    'pre-dom-update': PreDomUpdateEvent;
    'pre-series-update': PreSeriesUpdateEvent;
    'pre-scene-render': PreSceneRenderEvent;
    'process-data': ProcessDataEvent;
}
export declare class UpdateService {
    private readonly updateCallback;
    private readonly events;
    constructor(updateCallback: UpdateCallback);
    addListener<K extends keyof EventMap>(eventName: K, listener: EventListener<EventMap[K]>): () => void;
    destroy(): void;
    update(type?: ChartUpdateType, options?: UpdateOpts): void;
    dispatchUpdateComplete(apiUpdate: boolean, wasShortcut: boolean): void;
    dispatchPreDomUpdate(): void;
    dispatchPreSeriesUpdate(requiredRangeRatio: number, requiredRangeDirection: ChartAxisDirection): void;
    dispatchPreSceneRender(): void;
    dispatchProcessData({ series }: {
        series: {
            shouldFlipXY?: boolean;
        };
    }): void;
}
export {};
