import { ValueTag, type CellValue } from '@bilig/protocol';
import type { RuntimeDirectLookupDescriptor } from '../runtime-state.js';
import type { DirectScalarCurrentOperand } from './direct-formula-index-collection.js';
export type UniformNumericDirectLookup = Extract<RuntimeDirectLookupDescriptor, {
    kind: 'exact-uniform-numeric' | 'approximate-uniform-numeric';
}>;
export interface DirectLookupSheetVersionState {
    readonly structureVersion?: number;
    readonly columnVersions?: ArrayLike<number | undefined>;
}
export declare function directLookupVersionMatches(lookupSheet: DirectLookupSheetVersionState | undefined, lookup: UniformNumericDirectLookup): boolean;
export declare function withOptionalLookupStringIds(request: {
    sheetName: string;
    row: number;
    col: number;
    oldValue: CellValue;
    newValue: CellValue;
    oldStringId: number | undefined;
    newStringId: number | undefined;
    inputCellIndex?: number;
}): {
    sheetName: string;
    row: number;
    col: number;
    oldValue: CellValue;
    newValue: CellValue;
    oldStringId?: number;
    newStringId?: number;
    inputCellIndex?: number;
};
export declare function normalizeExactLookupKey(value: CellValue, lookupString: (id: number) => string, stringId?: number): string | undefined;
export declare function normalizeExactNumericValue(value: CellValue): number | undefined;
export declare function normalizeExactNumericNumber(value: number): number;
export declare function sameExactNumericValue(left: number, right: number): boolean;
export declare function sameExactNumericValueAsNormalized(left: number, normalizedRight: number): boolean;
export declare function normalizeApproximateNumericValue(value: CellValue): number | undefined;
export declare function normalizeApproximateTextValue(value: CellValue, lookupString: (id: number) => string, stringId?: number): string | undefined;
export declare function exactLookupLiteralNumericValue(value: unknown): number | undefined;
export declare function canSkipUniformApproximateNumericTailWrite(directLookup: Extract<RuntimeDirectLookupDescriptor, {
    kind: 'approximate-uniform-numeric';
}>, row: number, operandNumeric: number, oldNumeric: number, newNumeric: number): boolean;
export declare function canSkipUniformApproximateNumericTailWriteFromCurrentResult(cellStore: {
    readonly tags: ArrayLike<ValueTag | undefined>;
    readonly numbers: ArrayLike<number | undefined>;
}, formulaCellIndex: number, directLookup: Extract<RuntimeDirectLookupDescriptor, {
    kind: 'approximate-uniform-numeric';
}>, row: number, oldNumeric: number, newNumeric: number): boolean;
export declare function canSkipUniformExactNumericTailWriteFromCurrentResult(cellStore: {
    readonly tags: ArrayLike<ValueTag | undefined>;
    readonly numbers: ArrayLike<number | undefined>;
}, formulaCellIndex: number, directLookup: Extract<RuntimeDirectLookupDescriptor, {
    kind: 'exact-uniform-numeric';
}>, row: number, oldNumeric: number, newNumeric: number): boolean;
export declare function directLookupRowBounds(directLookup: Extract<RuntimeDirectLookupDescriptor, {
    kind: 'exact' | 'exact-uniform-numeric' | 'approximate' | 'approximate-uniform-numeric';
}>): {
    rowStart: number;
    rowEnd: number;
};
export declare function exactUniformLookupCurrentResult(directLookup: Extract<RuntimeDirectLookupDescriptor, {
    kind: 'exact-uniform-numeric';
}>, lookupValue: number): DirectScalarCurrentOperand;
export declare function exactUniformLookupNumericResult(directLookup: Extract<RuntimeDirectLookupDescriptor, {
    kind: 'exact-uniform-numeric';
}>, lookupValue: number): number | undefined;
export declare function approximateUniformLookupCurrentResult(directLookup: Extract<RuntimeDirectLookupDescriptor, {
    kind: 'approximate-uniform-numeric';
}>, lookupValue: number): DirectScalarCurrentOperand | undefined;
export declare function approximateUniformLookupNumericResult(directLookup: Extract<RuntimeDirectLookupDescriptor, {
    kind: 'approximate-uniform-numeric';
}>, lookupValue: number): number | undefined;
export declare function approximateRepeatedUniformLookupNumericResult(length: number, repeatedUniformStart: number | undefined, repeatedUniformStep: number | undefined, repeatedUniformRunLength: number | undefined, matchMode: 1 | -1, lookupValue: number): number | undefined;
export declare function approximateRepeatedUniformLookupCurrentResult(prepared: {
    readonly length: number;
    readonly repeatedUniformStart: number | undefined;
    readonly repeatedUniformStep: number | undefined;
    readonly repeatedUniformRunLength: number | undefined;
}, matchMode: 1 | -1, lookupValue: number): DirectScalarCurrentOperand | undefined;
