import type { U32 } from '../runtime-state.js';
export interface MutationSupportChangeSetFormulaRecord {
    readonly cellIndex: number;
    readonly compiled: {
        readonly volatile: boolean;
    };
}
interface MutationSupportFormulaTableView {
    readonly get: (cellIndex: number) => MutationSupportChangeSetFormulaRecord | undefined;
    readonly forEach: (callback: (formula: MutationSupportChangeSetFormulaRecord, cellIndex: number) => void) => void;
}
export interface MutationSupportChangeSetTracker {
    readonly beginMutationCollectionNow: () => void;
    readonly markInputChangedNow: (cellIndex: number, count: number) => number;
    readonly markFormulaChangedNow: (cellIndex: number, count: number) => number;
    readonly markExplicitChangedNow: (cellIndex: number, count: number) => number;
    readonly markVolatileFormulasChangedNow: (count: number) => number;
    readonly composeMutationRootsNow: (changedInputCount: number, formulaChangedCount: number) => U32;
    readonly composeEventChangesNow: (recalculated: U32, explicitChangedCount: number) => U32;
    readonly composeDisjointEventChangesNow: (recalculated: U32, explicitChangedCount: number) => U32;
    readonly unionChangedSetsNow: (...sets: Array<readonly number[] | U32>) => U32;
    readonly composeChangedRootsAndOrderedNow: (changedRoots: readonly number[] | U32, ordered: U32, orderedCount: number) => U32;
    readonly getChangedInputBufferNow: () => U32;
    readonly pushMaterializedCell: (cellIndex: number) => void;
    readonly resetMaterializedCellScratchNow: (expectedSize: number) => void;
}
export declare function createMutationSupportChangeSetTracker(args: {
    readonly formulas: MutationSupportFormulaTableView;
    readonly getVolatileFormulaCellIndices?: () => Iterable<number>;
    readonly ensureRecalcScratchCapacity: (size: number) => void;
    readonly getCellStoreSize: () => number;
    readonly getChangedInputEpoch: () => number;
    readonly setChangedInputEpoch: (next: number) => void;
    readonly getChangedInputSeen: () => U32;
    readonly getChangedInputBuffer: () => U32;
    readonly getChangedFormulaEpoch: () => number;
    readonly setChangedFormulaEpoch: (next: number) => void;
    readonly getChangedFormulaSeen: () => U32;
    readonly getChangedFormulaBuffer: () => U32;
    readonly getChangedUnionEpoch: () => number;
    readonly setChangedUnionEpoch: (next: number) => void;
    readonly getChangedUnionSeen: () => U32;
    readonly getChangedUnion: () => U32;
    readonly getMutationRoots: () => U32;
    readonly getMaterializedCellCount: () => number;
    readonly setMaterializedCellCount: (next: number) => void;
    readonly getMaterializedCells: () => U32;
    readonly setMaterializedCells: (next: U32) => void;
    readonly getExplicitChangedEpoch: () => number;
    readonly setExplicitChangedEpoch: (next: number) => void;
    readonly getExplicitChangedSeen: () => U32;
    readonly getExplicitChangedBuffer: () => U32;
}): MutationSupportChangeSetTracker;
export {};
