import { type EngineChangedCell } from '@bilig/protocol';
import type { EngineOpBatch } from '@bilig/workbook';
import type { EngineCellMutationRef } from '../../cell-mutations-at.js';
import { type OpOrder } from '../../replica-state.js';
import type { EngineRuntimeState, U32 } from '../runtime-state.js';
import type { DirectScalarCurrentOperand } from './direct-formula-index-collection.js';
import type { CreateEngineOperationServiceArgs } from './operation-service-types.js';
type FastPathState = Pick<EngineRuntimeState, 'workbook' | 'wasm' | 'ranges' | 'strings' | 'events' | 'formulas' | 'counters' | 'replicaState' | 'getLastMetrics' | 'setLastMetrics' | 'getSyncClientConnection' | 'trackReplicaVersions'>;
export interface OperationFreshDirectScalarFormulaBatchFastPathArgs {
    readonly state: FastPathState;
    readonly emitBatch: (batch: EngineOpBatch) => void;
    readonly setCellEntityVersion: (sheetName: string, address: string, order: OpOrder) => void;
    readonly hasTrackedExactLookupDependents: (sheetId: number, col: number) => boolean;
    readonly hasTrackedSortedLookupDependents: (sheetId: number, col: number) => boolean;
    readonly hasTrackedDirectRangeDependents: (sheetId: number, col: number) => boolean;
    readonly hasRegionFormulaSubscriptionsOverlappingRange?: (sheetId: number, rowStart: number, rowEnd: number, colStart: number, colEnd: number) => boolean;
    readonly getRegionFormulaSubscriptionCount?: () => number;
    readonly hasRegionFormulaSubscriptionsIntersectingRect: ((sheetId: number, rowStart: number, rowEnd: number, colStart: number, colEnd: number) => boolean) | undefined;
    readonly bindFreshDirectScalarFormulaRun: NonNullable<CreateEngineOperationServiceArgs['bindFreshDirectScalarFormulaRun']>;
    readonly registerFreshFormulaFamilyRun: CreateEngineOperationServiceArgs['registerFreshFormulaFamilyRun'];
    readonly upsertFormulaFamilyRun: CreateEngineOperationServiceArgs['upsertFormulaFamilyRun'];
    readonly upsertFreshFormulaInstances: CreateEngineOperationServiceArgs['upsertFreshFormulaInstances'];
    readonly compileTemplateFormula: NonNullable<CreateEngineOperationServiceArgs['compileTemplateFormula']>;
    readonly materializeDeferredStructuralFormulaSources: () => void;
    readonly checkEvaluationBudget: (stepCost?: number) => void;
    readonly beginMutationCollection: () => void;
    readonly ensureRecalcScratchCapacity: (size: number) => void;
    readonly resetMaterializedCellScratch: (expectedSize: number) => void;
    readonly getBatchMutationDepth: () => number;
    readonly setBatchMutationDepth: (next: number) => void;
    readonly markInputChanged: (cellIndex: number, count: number) => number;
    readonly markExplicitChanged: (cellIndex: number, count: number) => number;
    readonly getChangedInputBuffer: () => U32;
    readonly deferKernelSync: (cellIndices: readonly number[] | U32) => void;
    readonly captureChangedCells: (changedCellIndices: readonly number[] | U32) => readonly EngineChangedCell[];
    readonly applyDirectFormulaCurrentResult: (cellIndex: number, result: DirectScalarCurrentOperand) => boolean;
}
export declare function createOperationFreshDirectScalarFormulaBatchFastPath(args: OperationFreshDirectScalarFormulaBatchFastPathArgs): {
    readonly tryApplyFreshDirectScalarFormulaMatrixBatch: (refs: readonly EngineCellMutationRef[], batch: EngineOpBatch | null, source: 'local' | 'restore' | 'undo' | 'redo', potentialNewCells?: number) => boolean;
};
export {};
