import type { AxisEntrySnapshot, AxisKind } from './axis-map.js';
import type { AxisResidentCellIndex } from './axis-resident-cell-index.js';
import type { CellPageStore } from './cell-page-store.js';
import type { CellAxisIdentity, CellAxisIdentityStore } from './cell-axis-identity-store.js';
import type { SheetAxisMap } from './sheet-axis-map.js';
export interface LogicalVisibleAxisRef {
    readonly index: number;
    readonly id: string | undefined;
}
export interface LogicalVisibleCellRef {
    readonly sheetId: number;
    readonly row: number;
    readonly col: number;
    readonly rowRef: LogicalVisibleAxisRef;
    readonly colRef: LogicalVisibleAxisRef;
}
export interface LogicalVisibleCellPosition {
    readonly row: number;
    readonly col: number;
}
export interface LogicalAxisIdFactories {
    readonly createRowId: () => string;
    readonly createColumnId: () => string;
}
export declare class LogicalSheetStore {
    private sheetId;
    private readonly axisMap;
    private readonly cellPages;
    private readonly cellIdentities;
    private readonly residentCells;
    private readonly denseRowMajorVisibleCellBlocks;
    constructor(sheetId: number, axisMap: SheetAxisMap, cellPages: CellPageStore, cellIdentities: CellAxisIdentityStore, residentCells: AxisResidentCellIndex);
    setSheetId(sheetId: number): void;
    resolveVisibleAxis(axis: AxisKind, index: number): LogicalVisibleAxisRef;
    ensureVisibleAxis(axis: AxisKind, index: number, createId: () => string): LogicalVisibleAxisRef;
    private resolveVisibleLocation;
    resolveVisibleCell(row: number, col: number): LogicalVisibleCellRef;
    getVisibleCell(row: number, col: number): number | undefined;
    setVisibleCell(row: number, col: number, cellIndex: number, factories: LogicalAxisIdFactories): LogicalVisibleCellRef;
    setNewVisibleCell(row: number, col: number, cellIndex: number, factories: LogicalAxisIdFactories): LogicalVisibleCellRef;
    setNewVisibleCellWithAxisIds(row: number, col: number, cellIndex: number, rowId: string, colId: string): LogicalVisibleCellRef;
    setFreshVisibleCellWithAxisIdsDeferred(row: number, col: number, cellIndex: number, rowId: string, colId: string): LogicalVisibleCellRef;
    deferVisibleCellPageRebuild(): void;
    setFreshVisibleCellIdentityWithAxisIdsDeferred(cellIndex: number, rowId: string, colId: string): void;
    setFreshVisibleDenseRowMajorIdentitiesWithAxisIdsDeferred(firstCellIndex: number, rowIds: readonly string[], colIds: readonly string[]): void;
    private setVisibleCellInternal;
    deleteVisibleCell(row: number, col: number): boolean;
    deleteVisibleCellByIds(rowId: string, colId: string): boolean;
    moveVisibleCell(fromRow: number, fromCol: number, toRow: number, toCol: number, cellIndex: number, factories: LogicalAxisIdFactories): LogicalVisibleCellRef;
    getCellVisiblePosition(cellIndex: number): LogicalVisibleCellPosition | undefined;
    getCellVisibleAxisIndex(cellIndex: number, axis: AxisKind): number | undefined;
    getCellIdentity(cellIndex: number): CellAxisIdentity | undefined;
    cellIdentityMatchesVisiblePosition(cellIndex: number, row: number, col: number): boolean;
    listResidentCellIndices(axis: AxisKind, axisIds: readonly string[]): number[];
    listResidentCellIndicesUnordered(axis: AxisKind, axisIds: readonly string[]): number[];
    forEachResidentCellInAxisEntries(axis: AxisKind, entries: readonly AxisEntrySnapshot[], callback: (cellIndex: number, identity: CellAxisIdentity, axisIndex: number) => void): void;
    someResidentCellInAxisScope(axis: AxisKind, scope: {
        readonly start: number;
        readonly end?: number;
    }, predicate: (cellIndex: number, row: number, col: number) => boolean): boolean;
    forEachVisibleCellEntry(callback: (cellIndex: number, row: number, col: number) => void): void;
    forEachVisibleColumnCellEntry(col: number, callback: (cellIndex: number, row: number) => void): void;
    forEachVisibleRowCellEntry(row: number, callback: (cellIndex: number, col: number) => void): void;
    private getDenseRowMajorVisibleCell;
    private getDenseRowMajorVisibleCellAtPosition;
    private clearDenseRowMajorVisibleCellBlocks;
}
