import { type CellValue } from '@bilig/protocol';
import type { EngineRuntimeState, RuntimeFormula } from '../runtime-state.js';
import type { CriterionRangePair } from './criterion-range-cache-service.js';
export interface ResolvedDirectCriteriaPairs {
    readonly pairs: CriterionRangePair[];
    readonly error: CellValue | undefined;
}
export declare function createDirectCriteriaSharingContext(args: {
    readonly state: Pick<EngineRuntimeState, 'workbook' | 'formulas'>;
    readonly readCellValueByIndex: (cellIndex: number | undefined) => CellValue;
}): {
    readonly directCriteriaShareCount: (criteriaVersionKey: string) => number;
    readonly directCriteriaShapeKeyForPairs: (pairs: readonly CriterionRangePair[]) => string;
    readonly directCriteriaVersionKeyForPairs: (pairs: readonly CriterionRangePair[]) => string;
    readonly resolveDirectCriteriaPairs: (formula: RuntimeFormula) => ResolvedDirectCriteriaPairs | undefined;
    readonly shouldUseCompoundExactBucketIndex: (pairs: readonly CriterionRangePair[]) => boolean;
};
