import { ValueTag, type CellValue } from '@bilig/protocol';
import type { PreparedApproximateVectorLookup } from '../runtime-state.js';
export interface ApproximateColumnIndexEntry {
    sheetName: string;
    rowStart: number;
    rowEnd: number;
    col: number;
    columnVersion: number;
    structureVersion: number;
    comparableKind: 'numeric' | 'text' | undefined;
    uniformStart: number | undefined;
    uniformStep: number | undefined;
    repeatedUniformStart: number | undefined;
    repeatedUniformStep: number | undefined;
    repeatedUniformRunLength: number | undefined;
    sortedAscending: boolean;
    sortedDescending: boolean;
    numericValues: Float64Array | undefined;
    textValues: string[] | undefined;
}
export type ApproximateComparable = {
    kind: 'empty';
} | {
    kind: 'numeric';
    value: number;
} | {
    kind: 'text';
    value: string;
} | {
    kind: 'invalid';
};
type UniformNumericApproximateMatchResult = {
    handled: false;
} | {
    handled: true;
    position: number | undefined;
};
interface SingleColumnBoundsRequest {
    sheetName: string;
    start: string;
    end: string;
    startRow?: number;
    endRow?: number;
    startCol?: number;
    endCol?: number;
}
export interface SingleColumnBounds {
    rowStart: number;
    rowEnd: number;
    col: number;
}
export declare function getColumnCacheKey(sheetName: string, col: number, rowStart: number, rowEnd: number): string;
export declare function normalizeApproximateComparableValue(value: CellValue, lookupString: (id: number) => string, stringId?: number): ApproximateComparable;
export declare function compareApproximateNumeric(left: number, right: number): number;
export declare function compareApproximateText(left: string, right: string): number;
export declare function findUniformNumericApproximatePosition(args: {
    lookupValue: number;
    length: number;
    matchMode: 1 | -1;
    uniformStart: number | undefined;
    uniformStep: number | undefined;
}): UniformNumericApproximateMatchResult;
export declare function findRepeatedUniformNumericApproximatePosition(args: {
    lookupValue: number;
    length: number;
    matchMode: 1 | -1;
    repeatedUniformStart: number | undefined;
    repeatedUniformStep: number | undefined;
    repeatedUniformRunLength: number | undefined;
}): UniformNumericApproximateMatchResult;
export declare function supportsPreparedApproximateKind(prepared: PreparedApproximateVectorLookup, kind: 'numeric' | 'text', matchMode: 1 | -1): boolean;
export declare function detectUniformNumericStep(values: Float64Array): {
    start: number;
    step: number;
} | undefined;
export declare function detectRepeatedUniformNumericStep(values: Float64Array): {
    start: number;
    step: number;
    runLength: number;
} | undefined;
export declare function decodeValueTag(rawTag: number | undefined): ValueTag;
export declare function resolveSingleColumnBounds(request: SingleColumnBoundsRequest): SingleColumnBounds | undefined;
export declare function columnRegistryKey(sheetName: string, col: number): string;
export {};
