import type { EngineCellMutationRef } from '../../cell-mutations-at.js';
import type { PreparedCellAddress } from '../runtime-state.js';
interface OperationPreparedCellWorkbook {
    readonly cellKeyToIndex: {
        get(key: number): number | undefined;
    };
    readonly getCellIndex: (sheetName: string, address: string) => number | undefined;
    readonly getSheet: (sheetName: string) => {
        readonly id: number;
    } | undefined;
    readonly getSheetById: (sheetId: number) => {
        readonly id: number;
    } | undefined;
    readonly getOrCreateSheet: (sheetName: string) => {
        readonly id: number;
    } | undefined;
    readonly ensureCellAt: (sheetId: number, row: number, col: number) => {
        readonly cellIndex: number;
    };
}
interface OperationMutationCellResolverWorkbook {
    readonly cellStore: {
        readonly sheetIds: ArrayLike<number | undefined>;
        readonly rows: ArrayLike<number | undefined>;
        readonly cols: ArrayLike<number | undefined>;
    };
    readonly cellKeyToIndex: {
        get(key: number): number | undefined;
    };
    readonly getSheetById: (sheetId: number) => {
        readonly structureVersion: number;
        readonly logical?: {
            getCellVisiblePosition(cellIndex: number): {
                readonly row: number;
                readonly col: number;
            } | undefined;
        };
    } | undefined;
}
interface OperationSheetNameResolverWorkbook {
    readonly getSheetById: (sheetId: number) => {
        readonly name: string;
    } | undefined;
}
export interface OperationPreparedCellTracker {
    readonly invalidateSheetName: (sheetName: string) => void;
    readonly getExistingCellIndex: (sheetName: string, address: string, preparedCellAddress: PreparedCellAddress | null) => number | undefined;
    readonly ensureCellTracked: (sheetName: string, address: string, preparedCellAddress: PreparedCellAddress | null) => number;
}
export interface OperationSheetNameResolver {
    readonly resolve: (sheetId: number) => string;
}
export declare function createOperationPreparedCellTracker(args: {
    readonly workbook: OperationPreparedCellWorkbook;
    readonly ensureCellTracked: (sheetName: string, address: string) => number;
}): OperationPreparedCellTracker;
export declare function createOperationSheetNameResolver(workbook: OperationSheetNameResolverWorkbook): OperationSheetNameResolver;
export declare function resolveOperationExistingMutationCellIndex(workbook: OperationMutationCellResolverWorkbook, ref: EngineCellMutationRef): number | undefined;
export {};
