import { _ModuleSupport } from 'ag-charts-community';
import { AbstractModuleInstance, Bitfield, type DynamicContext } from 'ag-charts-core';
import type { DataSetSelectionsIterator } from './dataSelectionUtil';
import { DataSetSelection } from './dataSetSelection';
type ChartRegistry = _ModuleSupport.ChartRegistry;
type DataChangeDescription = _ModuleSupport.DataChangeDescription;
type DataSet<T = unknown> = _ModuleSupport.DataSet<T>;
type IDataSelectionService = _ModuleSupport.IDataSelectionService;
type SelectionStateEnum = _ModuleSupport.SelectionState;
type SeriesLike = Parameters<IDataSelectionService['getDataSelectionState']>[0];
export declare class DataSelectionService extends AbstractModuleInstance implements IDataSelectionService {
    private readonly ctx?;
    totalSelectedCount: number;
    totalCandidacyCount: number;
    candidacyInProgress: boolean;
    candidacyUnion: boolean;
    /** Per-series selection state. Keyed by `seriesId`. */
    selections: Map<string, DataSetSelection>;
    /** Per-series candidacy state. Keyed by `seriesId`. */
    private readonly candidacy;
    constructor(ctx?: DynamicContext<ChartRegistry> | undefined);
    private recountTotalSelections;
    private isSeriesSelectionEnabled;
    clearSelection(): void;
    clearCandidacy(): void;
    /** Lazy-create a per-series selection backed by a Uint8Array of `data.length`. */
    enableSelection(seriesId: string, data: DataSet<unknown>): DataSetSelection;
    enableCandidacy(seriesId: string, data: DataSet): Bitfield;
    iterateDataSetSelections(): Generator<DataSetSelectionsIterator>;
    /**
     * Transfer persistent state (selections) from a predecessor DataSet.
     * Uses `idArray` + `idToIndexMap` to map selected keys from old to new index space.
     * Without `dataIdKey`, selections cannot be transferred and are dropped.
     */
    transferDataSet<T>(newDataSet: DataSet<T>, oldDataSet: DataSet<T>): void;
    onDataChange(changeDescription: DataChangeDescription): void;
    getDataSetSelection(series: SeriesLike): DataSetSelection | undefined;
    getDataSelectionState(series: SeriesLike, datumIndex: number | undefined): SelectionStateEnum | undefined;
    getDataCandidateState(series: SeriesLike, datumIndex: number | undefined): SelectionStateEnum | undefined;
}
export {};
