import type { LiteralInput, RecalcMetrics } from '@bilig/protocol';
import type { EngineExistingNumericCellMutationResult } from '../../cell-mutations-at.js';
import type { SheetRecord } from '../../workbook-store.js';
import type { CreateEngineOperationServiceArgs } from './operation-service-types.js';
export interface OperationDirectAggregateLiteralMutationRequest {
    readonly existingIndex: number;
    readonly sheetId?: number;
    readonly sheetName: string;
    readonly row: number;
    readonly col: number;
    readonly value: LiteralInput;
    readonly delta: number;
    readonly emitTracked: boolean;
    readonly singleRangeEntityDependent?: number;
}
export interface OperationTrustedRangeDirectAggregateExistingNumericMutationRequest {
    readonly existingIndex: number;
    readonly rangeEntityDependent: number;
    readonly sheet: SheetRecord;
    readonly sheetId: number;
    readonly col: number;
    readonly value: number;
    readonly delta: number;
    readonly hasExactLookupDependents: boolean;
    readonly hasSortedLookupDependents: boolean;
}
export interface OperationTrustedColumnDirectAggregateExistingNumericMutationRequest {
    readonly existingIndex: number;
    readonly sheet: SheetRecord;
    readonly sheetId: number;
    readonly sheetName: string;
    readonly row: number;
    readonly col: number;
    readonly value: number;
    readonly delta: number;
    readonly hasExactLookupDependents: boolean;
    readonly hasSortedLookupDependents: boolean;
}
export interface OperationDirectAggregateLiteralFastPathArgs {
    readonly state: Pick<CreateEngineOperationServiceArgs['state'], 'workbook' | 'counters' | 'events' | 'setLastMetrics'>;
    readonly directRangePostRecalcLimit: number;
    readonly getSingleEntityDependent: (entityId: number) => number;
    readonly collectAffectedDirectRangeDependents: (request: {
        readonly sheetName: string;
        readonly row: number;
        readonly col: number;
    }) => readonly number[];
    readonly collectSingleApplicableDirectAggregateDependent: (request: {
        readonly sheetName: string;
        readonly sheetId?: number;
        readonly row: number;
        readonly col: number;
    }) => number;
    readonly canApplyDirectAggregateLiteralDeltaForRequest: (formulaCellIndex: number, request: {
        readonly sheetName: string;
        readonly sheetId?: number;
        readonly row: number;
        readonly col: number;
    }) => boolean;
    readonly canApplyDirectAggregateLiteralDelta: (formulaCellIndex: number) => boolean;
    readonly writeFastPathLiteralToExistingCell: (existingIndex: number, value: LiteralInput) => void;
    readonly writeTrustedExistingNumericLiteralToCell: (existingIndex: number, sheet: SheetRecord, col: number, value: number) => void;
    readonly applyTerminalDirectFormulaNumericDeltaAndReturn: (formulaCellIndex: number, delta: number) => number | undefined;
    readonly applyDirectFormulaNumericDelta: (formulaCellIndex: number, delta: number) => boolean;
    readonly applyDirectFormulaNumericDeltaBatch: (formulaCellIndices: readonly number[] | Uint32Array, delta: number) => boolean;
    readonly cellsShareVersionColumn: (leftCellIndex: number, rightCellIndex: number) => boolean;
    readonly withOptionalColumnVersionBatch: (enabled: boolean, apply: () => void) => void;
    readonly deferSingleCellKernelSync: (cellIndex: number) => void;
    readonly makeSingleLiteralSkipMetrics: () => RecalcMetrics;
}
export declare function tryApplySingleDirectAggregateLiteralMutationFastPath(args: OperationDirectAggregateLiteralFastPathArgs, request: OperationDirectAggregateLiteralMutationRequest): EngineExistingNumericCellMutationResult | null;
export declare function tryApplyTrustedSingleRangeDirectAggregateExistingNumericMutation(args: OperationDirectAggregateLiteralFastPathArgs, request: OperationTrustedRangeDirectAggregateExistingNumericMutationRequest): EngineExistingNumericCellMutationResult | null;
export declare function tryApplyTrustedColumnDirectAggregateExistingNumericMutation(args: OperationDirectAggregateLiteralFastPathArgs, request: OperationTrustedColumnDirectAggregateExistingNumericMutationRequest): EngineExistingNumericCellMutationResult | null;
