import type { BandedDomainConfig } from '../../dataDomain';
import type { InternalDefinition, ProcessedData, ReducerOutputPropertyDefinition, ScopeId } from '../../dataModelTypes';
import type { BandIndexMap } from '../utils/bandedStructure';
import { BandedReducer, type ReducerContext } from './bandedReducer';
/**
 * Extended reducer context with scope information.
 */
export interface ReducerContextWithScope extends ReducerContext {
    scopeId: ScopeId | undefined;
}
export interface ReducerEvaluationOptions {
    reuseCleanBands?: boolean;
    beforeEvaluate?: (bandManager: BandedReducer, context: ReducerContextWithScope) => void;
}
/**
 * Manages reducer evaluation with band-based caching.
 * Symmetrical to DomainManager which manages domain computation with band-based caching.
 *
 * Responsibilities:
 * - Creating and managing BandedReducer instances per reducer property
 * - Creating reducer contexts from processed data
 * - Orchestrating reducer evaluation lifecycle
 * - Applying index map updates to reducer bands
 * - Collecting optimization metadata
 * - Providing utility methods for non-banded reducer evaluation
 */
export declare class ReducerManager {
    private readonly bandingConfig;
    constructor(bandingConfig?: BandedDomainConfig);
    /**
     * Evaluates a reducer over a specific range of data indices.
     * Used for non-banded reducer evaluation (fallback path).
     *
     * This is a static utility method for cases where banding is not applicable
     * (e.g., grouped data, small datasets, reducers that don't support banding).
     *
     * @param def Reducer definition with initial value
     * @param reducer Reducer function to apply
     * @param context Reducer context with data and keys
     * @param startIndex Starting index (inclusive)
     * @param endIndex Ending index (exclusive)
     * @returns Accumulated reducer result for the range
     */
    static evaluateRange(def: ReducerOutputPropertyDefinition, reducer: ReturnType<ReducerOutputPropertyDefinition['reducer']>, context: ReducerContext, startIndex: number, endIndex: number): unknown;
    /**
     * Evaluates a banded reducer and returns the aggregated result.
     * Symmetrical to DomainManager.recomputeDomains().
     *
     * @param def Reducer definition
     * @param processedData Processed data containing raw data and keys
     * @param options Evaluation options including band reuse settings
     * @returns Aggregated reducer result
     */
    evaluate(def: ReducerOutputPropertyDefinition & InternalDefinition<false>, processedData: ProcessedData<any>, options?: ReducerEvaluationOptions): unknown;
    /**
     * Applies index map transformations to all reducer bands.
     * Symmetrical to DomainManager's band update logic.
     *
     * @param processedData Processed data containing reducer bands
     * @param indexMap Index map with splice operations and updated indices
     */
    applyIndexMap(processedData: ProcessedData<any>, indexMap: BandIndexMap): void;
    /**
     * Creates a reducer context from processed data.
     * Extracts raw data and key columns for the appropriate scope.
     * Symmetrical to domain context creation in DomainManager.
     *
     * @param def Reducer definition
     * @param processedData Processed data
     * @returns Reducer context with scope information, or undefined if not applicable
     */
    private createContext;
}
