import { ValueTag, type CellValue } from '@bilig/protocol';
import type { RuntimeDirectLookupDescriptor } from '../runtime-state.js';
import type { DirectScalarCurrentOperand } from './direct-formula-index-collection.js';
import type { ExactColumnIndexService } from './exact-column-index-service.js';
import type { SortedColumnSearchService } from './sorted-column-search-service.js';
import { type DirectLookupSheetVersionState } from './direct-lookup-helpers.js';
interface OperationDirectLookupFormulaAccess {
    get(cellIndex: number): {
        readonly directLookup: RuntimeDirectLookupDescriptor | undefined;
    } | undefined;
}
interface OperationDirectLookupWorkbookAccess {
    readonly cellStore: {
        readonly tags: ArrayLike<ValueTag | undefined>;
        readonly numbers: ArrayLike<number | undefined>;
    };
    getSheetById(sheetId: number): (DirectLookupSheetVersionState & {
        readonly id?: number;
    }) | undefined;
}
export interface OperationDirectLookupCurrentService {
    readonly tryDirectUniformLookupCurrentResult: (formulaCellIndex: number) => DirectScalarCurrentOperand | undefined;
    readonly tryDirectUniformLookupCurrentResultFromNumeric: (formulaCellIndex: number, exactLookupValue: number | undefined, approximateLookupValue: number | undefined, lookupSheetHint?: DirectLookupSheetVersionState & {
        readonly id?: number;
    }) => DirectScalarCurrentOperand | undefined;
    readonly tryDirectUniformLookupNumericResultFromDescriptor: (directLookup: RuntimeDirectLookupDescriptor | undefined, exactLookupValue: number | undefined, approximateLookupValue: number | undefined, lookupSheetHint?: DirectLookupSheetVersionState & {
        readonly id?: number;
    }) => number | undefined;
    readonly canEvaluateDirectUniformLookupCurrentResultFromNumeric: (formulaCellIndex: number, exactLookupValue: number | undefined, approximateLookupValue: number | undefined) => boolean;
    readonly tryDirectApproximateLookupCurrentResultFromNumeric: (directLookup: Extract<RuntimeDirectLookupDescriptor, {
        kind: 'approximate';
    }>, lookupValue: number) => DirectScalarCurrentOperand | undefined;
    readonly tryDirectExactLookupCurrentResult: (directLookup: Extract<RuntimeDirectLookupDescriptor, {
        kind: 'exact';
    }>, lookupValue: CellValue) => DirectScalarCurrentOperand | undefined;
}
export declare function createOperationDirectLookupCurrentService(args: {
    readonly state: {
        readonly workbook: OperationDirectLookupWorkbookAccess;
        readonly formulas: OperationDirectLookupFormulaAccess;
    };
    readonly exactLookup: Pick<ExactColumnIndexService, 'findPreparedVectorMatch'>;
    readonly sortedLookup: Pick<SortedColumnSearchService, 'findPreparedVectorMatch'>;
}): OperationDirectLookupCurrentService;
export {};
