import { type CellValue } from '@bilig/protocol';
import type { RuntimeColumnOwner } from './runtime-column-store-service.js';
export interface LookupColumnOwner {
    readonly sheetName: string;
    readonly col: number;
    columnVersion: number;
    structureVersion: number;
    sheetColumnVersions: Uint32Array;
    readonly rowStart: number;
    readonly rowEnd: number;
    readonly length: number;
    readonly kindCodes: Uint8Array;
    readonly numericValues: Float64Array;
    readonly textValues: string[];
    readonly firstPositions: Map<string, number>;
    readonly lastPositions: Map<string, number>;
    readonly rowLists: Map<string, number[]>;
    sortedNumericAscendingBreaks: Uint32Array | undefined;
    sortedNumericDescendingBreaks: Uint32Array | undefined;
    numericUniformBreakOffsets: Uint32Array | undefined;
    sortedTextAscendingBreaks: Uint32Array | undefined;
    sortedTextDescendingBreaks: Uint32Array | undefined;
    incompatibleNumericOffsets: Uint32Array | undefined;
    incompatibleTextOffsets: Uint32Array | undefined;
    exactNumericIncompatibleOffsets: Uint32Array | undefined;
    exactTextIncompatibleOffsets: Uint32Array | undefined;
    summariesDirty: boolean;
}
export interface ExactRangeSummary {
    readonly comparableKind: 'numeric' | 'text' | 'mixed';
    readonly uniformStart: number | undefined;
    readonly uniformStep: number | undefined;
}
export interface ApproximateRangeSummary {
    readonly comparableKind: 'numeric' | 'text' | undefined;
    readonly uniformStart: number | undefined;
    readonly uniformStep: number | undefined;
    readonly repeatedUniformStart: number | undefined;
    readonly repeatedUniformStep: number | undefined;
    readonly repeatedUniformRunLength: number | undefined;
    readonly sortedAscending: boolean;
    readonly sortedDescending: boolean;
}
export declare function isLookupColumnOwner(value: unknown): value is LookupColumnOwner;
export interface LookupColumnOwnerWrite {
    readonly row: number;
    readonly oldValue: CellValue;
    readonly newValue: CellValue;
    readonly oldStringId?: number;
    readonly newStringId?: number;
}
export interface LookupColumnOwnerWriteOptions {
    readonly updateApproximateSummaries?: boolean;
}
export declare function findExactMatchInRange(owner: LookupColumnOwner, key: string, rowStart: number, rowEnd: number, searchMode: 1 | -1): number | undefined;
export declare function findExactNumericApproximateMatchInRange(owner: LookupColumnOwner, lookupValue: number, rowStart: number, rowEnd: number): number | undefined;
export declare function buildLookupColumnOwner(args: {
    readonly owner: RuntimeColumnOwner;
    readonly normalizeStringId: (stringId: number) => string;
}): LookupColumnOwner | undefined;
export declare function applyLookupColumnOwnerLiteralWrite(args: {
    readonly owner: LookupColumnOwner;
    readonly write: LookupColumnOwnerWrite;
    readonly normalizeStringId: (stringId: number) => string;
    readonly updateApproximateSummaries?: boolean;
}): boolean;
export declare function supportsNumericApproximateRange(owner: LookupColumnOwner, rowStart: number, rowEnd: number, matchMode: 1 | -1): boolean;
export declare function supportsTextApproximateRange(owner: LookupColumnOwner, rowStart: number, rowEnd: number, matchMode: 1 | -1): boolean;
export declare function sliceOffsetBounds(owner: LookupColumnOwner, rowStart: number, rowEnd: number): {
    start: number;
    end: number;
} | undefined;
export declare function summarizeExactRange(owner: LookupColumnOwner, rowStart: number, rowEnd: number): ExactRangeSummary | undefined;
export declare function summarizeApproximateRange(owner: LookupColumnOwner, rowStart: number, rowEnd: number): ApproximateRangeSummary | undefined;
