import type { CellValue } from '@bilig/protocol';
import type { EngineCellMutationRef } from '../../cell-mutations-at.js';
import type { OpOrder } from '../../replica-state.js';
import type { CreateEngineOperationServiceArgs, MutationSource } from './operation-service-types.js';
import type { DirectFormulaIndexCollection } from './direct-formula-index-collection.js';
import type { OperationTrackedColumnDependencyFlags } from './operation-column-dependency-tracker.js';
import type { ExactLookupImpactCaches } from './operation-lookup-dirty-markers.js';
import type { OperationLookupAccess } from './operation-lookup-access.js';
type ClearCellMutation = Extract<EngineCellMutationRef['mutation'], {
    kind: 'clearCell';
}>;
type OperationCellMutationSource = Exclude<MutationSource, 'remote'>;
interface ClearCellMutationCounts {
    readonly changedInputCount: number;
    readonly formulaChangedCount: number;
    readonly explicitChangedCount: number;
    readonly topologyChanged: boolean;
}
interface ApplyClearCellMutationArgs extends ClearCellMutationCounts {
    readonly serviceArgs: CreateEngineOperationServiceArgs;
    readonly sheetId: number;
    readonly mutation: ClearCellMutation;
    readonly existingIndex: number | undefined;
    readonly source: OperationCellMutationSource;
    readonly isRestore: boolean;
    readonly trackExplicitChanges: boolean;
    readonly order: OpOrder | undefined;
    readonly dependencyFlags: OperationTrackedColumnDependencyFlags;
    readonly postRecalcDirectFormulaIndices: DirectFormulaIndexCollection;
    readonly exactLookupImpactCaches: ExactLookupImpactCaches;
    readonly resolveSheetName: (sheetId: number) => string;
    readonly setCellEntityVersion: (sheetName: string, address: string, order: OpOrder) => void;
    readonly isClearCellNoOp: (cellIndex: number) => boolean;
    readonly canFastPathLiteralOverwrite: (cellIndex: number) => boolean;
    readonly readCellValueForLookup: OperationLookupAccess['readCellValueForLookup'];
    readonly rebindValueSensitiveFormulaDependents: (cellIndex: number, counts: ClearCellMutationCounts) => ClearCellMutationCounts;
    readonly markPostRecalcDirectFormulaDependents: (cellIndex: number, postRecalcDirectFormulaIndices: DirectFormulaIndexCollection, oldValue?: CellValue, newValue?: CellValue) => boolean;
    readonly markDirectScalarDeltaClosure: (rootCellIndex: number, oldValue: CellValue, newValue: CellValue, postRecalcDirectFormulaIndices: DirectFormulaIndexCollection) => void;
    readonly noteExactLookupLiteralWriteWhenDirty: (request: {
        readonly sheetName: string;
        readonly row: number;
        readonly col: number;
        readonly oldValue: CellValue;
        readonly newValue: CellValue;
        readonly oldStringId?: number;
        readonly newStringId?: number;
        readonly inputCellIndex?: number;
    }, formulaChangedCount: number, caches: ExactLookupImpactCaches) => number;
    readonly noteSortedLookupLiteralWriteWhenDirty: (request: {
        readonly sheetName: string;
        readonly row: number;
        readonly col: number;
        readonly oldValue: CellValue;
        readonly newValue: CellValue;
        readonly oldStringId?: number;
        readonly newStringId?: number;
    }, formulaChangedCount: number) => number;
    readonly markAffectedDirectRangeDependents: (request: {
        readonly sheetName: string;
        readonly row: number;
        readonly col: number;
        readonly oldValue: CellValue;
        readonly newValue: CellValue;
        readonly oldStringId?: number;
        readonly newStringId?: number;
        readonly inputCellIndex?: number;
    }, formulaChangedCount: number, postRecalcDirectFormulaIndices: DirectFormulaIndexCollection) => number;
    readonly clearTrackedColumnDependencyFlagCache: () => void;
    readonly pruneCellIfOrphaned: (cellIndex: number) => void;
    readonly normalizeHistoryDependencyPlaceholder: (cellIndex: number, source: MutationSource) => void;
}
export declare function applyClearCellMutation(request: ApplyClearCellMutationArgs): ClearCellMutationCounts;
export {};
