import { type EngineCounters } from './perf/engine-counters.js';
export declare const BLOCK_ROWS = 128;
export declare const BLOCK_COLS = 32;
export interface SheetGridAxisRemapScope {
    readonly start: number;
    readonly end?: number;
}
export interface SheetGridLogicalLookup {
    get(row: number, col: number): number | undefined;
    forEachCellEntry(fn: (cellIndex: number, row: number, col: number) => void): void;
    someCellInAxisScope?(axis: 'row' | 'column', scope: SheetGridAxisRemapScope, predicate: (cellIndex: number, row: number, col: number) => boolean): boolean;
}
export declare class SheetGrid {
    private readonly counters?;
    private readonly logicalLookup?;
    readonly blocks: Map<number, Uint32Array<ArrayBufferLike>>;
    constructor(counters?: EngineCounters | undefined, logicalLookup?: SheetGridLogicalLookup | undefined);
    private setInBlocks;
    get(row: number, col: number): number;
    getPhysical(row: number, col: number): number;
    createPhysicalGetter(): (row: number, col: number) => number;
    forEachPhysicalRangeEntry(rowStart: number, colStart: number, rowEnd: number, colEnd: number, fn: (cellIndex: number, row: number, col: number) => void): void;
    forEachPhysicalColumnEntry(col: number, fn: (cellIndex: number, row: number) => void): void;
    set(row: number, col: number, cellIndex: number): void;
    createRowMajorSetter(): (row: number, col: number, cellIndex: number) => void;
    setDenseRowMajor(rowStart: number, colStart: number, rowCount: number, colCount: number, firstCellIndex: number): void;
    private setDenseRowMajorBlocks;
    private setDenseRowMajorSingleBlockColumn;
    clear(row: number, col: number): void;
    releaseBlocksToPool(): void;
    forEachInRange(rowStart: number, colStart: number, rowEnd: number, colEnd: number, fn: (cellIndex: number) => void): void;
    forEachCell(fn: (cellIndex: number) => void): void;
    forEachCellEntry(fn: (cellIndex: number, row: number, col: number) => void): void;
    collectAxisRemapEntries(axis: 'row' | 'column', remapIndex: (index: number) => number | undefined, scope?: SheetGridAxisRemapScope): Array<{
        cellIndex: number;
        row: number;
        col: number;
        nextRow: number | undefined;
        nextCol: number | undefined;
    }>;
    someCellInAxisScope(axis: 'row' | 'column', scope: SheetGridAxisRemapScope, predicate: (cellIndex: number, row: number, col: number) => boolean): boolean;
    remapAxis(axis: 'row' | 'column', remapIndex: (index: number) => number | undefined, scope?: SheetGridAxisRemapScope): Array<{
        cellIndex: number;
        row: number;
        col: number;
        nextRow: number | undefined;
        nextCol: number | undefined;
    }>;
}
