import { ValueTag, type CellValue } from '@bilig/protocol';
import type { EngineRuntimeState } from '../runtime-state.js';
import { type EngineCounters } from '../../perf/engine-counters.js';
export interface RuntimeColumnSlice {
    readonly sheetName: string;
    readonly rowStart: number;
    readonly rowEnd: number;
    readonly col: number;
    readonly length: number;
    columnVersion: number;
    structureVersion: number;
    sheetColumnVersions: Uint32Array;
    tags: Uint8Array;
    numbers: Float64Array;
    stringIds: Uint32Array;
    errors: Uint16Array;
}
export interface RuntimeColumnPage {
    readonly rowStart: number;
    nonEmptyCount: number;
    readonly tags: Uint8Array;
    readonly numbers: Float64Array;
    readonly stringIds: Uint32Array;
    readonly errors: Uint16Array;
}
export interface RuntimeColumnOwner {
    readonly sheetName: string;
    readonly col: number;
    columnVersion: number;
    structureVersion: number;
    sheetColumnVersions: Uint32Array;
    readonly pages: ReadonlyMap<number, RuntimeColumnPage>;
}
export interface RuntimeColumnView {
    readonly owner: RuntimeColumnOwner;
    readonly sheetName: string;
    readonly rowStart: number;
    readonly rowEnd: number;
    readonly col: number;
    readonly length: number;
    readonly columnVersion: number;
    readonly structureVersion: number;
    readonly sheetColumnVersions: Uint32Array;
    readonly readTagAt: (offset: number) => number;
    readonly readNumberAt: (offset: number) => number;
    readonly readStringIdAt: (offset: number) => number;
    readonly readErrorAt: (offset: number) => number;
    readonly readCellValueAt: (offset: number) => CellValue;
}
export interface EngineRuntimeColumnStoreService {
    readonly reset: () => void;
    readonly getColumnOwner: (request: {
        sheetName: string;
        col: number;
    }) => RuntimeColumnOwner;
    readonly getColumnView: (request: {
        sheetName: string;
        rowStart: number;
        rowEnd: number;
        col: number;
    }) => RuntimeColumnView;
    readonly getColumnSlice: (request: {
        sheetName: string;
        rowStart: number;
        rowEnd: number;
        col: number;
    }) => RuntimeColumnSlice;
    readonly readCellValue: (sheetName: string, row: number, col: number) => CellValue;
    readonly readRangeValues: (request: {
        sheetName: string;
        rowStart: number;
        rowEnd: number;
        colStart: number;
        colEnd: number;
    }) => CellValue[];
    readonly readRangeValueMatrix: (request: {
        sheetName: string;
        rowStart: number;
        rowEnd: number;
        colStart: number;
        colEnd: number;
    }) => CellValue[][];
    readonly findMaxResidentRowInColumns: (request: {
        sheetName: string;
        rowStart: number;
        rowEnd: number;
        colStart: number;
        colEnd: number;
    }) => number;
    readonly normalizeStringId: (stringId: number) => string;
    readonly normalizeLookupText: (value: Extract<CellValue, {
        tag: ValueTag.String;
    }>) => string;
}
export declare function createEngineRuntimeColumnStoreService(args: {
    readonly state: Pick<EngineRuntimeState, 'workbook' | 'strings'> & {
        counters?: EngineCounters;
    };
}): EngineRuntimeColumnStoreService;
