import type { EngineCellMutationRef } from '../../cell-mutations-at.js';
import type { OpOrder } from '../../replica-state.js';
import type { DirectFormulaIndexCollection, DirectScalarCurrentOperand } from './direct-formula-index-collection.js';
import type { OperationTrackedColumnDependencyFlags } from './operation-column-dependency-tracker.js';
import type { OperationDirectRangeDependentService } from './operation-direct-range-dependents.js';
import type { CreateEngineOperationServiceArgs } from './operation-service-types.js';
type SetCellFormulaMutation = Extract<EngineCellMutationRef['mutation'], {
    kind: 'setCellFormula';
}>;
interface SetCellFormulaMutationCounts {
    readonly changedInputCount: number;
    readonly formulaChangedCount: number;
    readonly explicitChangedCount: number;
    readonly topologyChanged: boolean;
    readonly compileMs: number;
}
interface ApplySetCellFormulaMutationArgs extends SetCellFormulaMutationCounts {
    readonly serviceArgs: CreateEngineOperationServiceArgs;
    readonly sheetId: number;
    readonly sheetName: string;
    readonly mutation: SetCellFormulaMutation;
    readonly existingIndex: number | undefined;
    readonly isRestore: boolean;
    readonly trackExplicitChanges: boolean;
    readonly order: OpOrder | undefined;
    readonly dependencyFlags: OperationTrackedColumnDependencyFlags;
    readonly postRecalcDirectFormulaIndices: DirectFormulaIndexCollection;
    readonly batchMayNeedFreshAggregateInputCoverage: boolean;
    readonly setCellEntityVersion: (sheetName: string, address: string, order: OpOrder) => void;
    readonly readExactNumericValueForLookup: (cellIndex: number) => number | undefined;
    readonly tryApplyFormulaReplacementAsDirectScalarDeltaRoot: (request: {
        readonly cellIndex: number;
        readonly oldNumber: number | undefined;
        readonly changedTopology: boolean;
        readonly postRecalcDirectFormulaIndices: DirectFormulaIndexCollection;
    }) => boolean;
    readonly collectAffectedDirectRangeDependents: OperationDirectRangeDependentService['collectAffectedDirectRangeDependents'];
    readonly clearTrackedColumnDependencyFlagCache: () => void;
    readonly applyDirectFormulaCurrentResult: (cellIndex: number, result: DirectScalarCurrentOperand) => boolean;
}
export declare function applySetCellFormulaMutation(request: ApplySetCellFormulaMutationArgs): SetCellFormulaMutationCounts;
export {};
