import { type CompiledFormula } from '@bilig/formula';
import { type CompiledPlanRecord, type MaterializedDependencies, type RuntimeDirectAggregateDescriptor, type RuntimeDirectCriteriaDescriptor, type RuntimeDirectLookupDescriptor, type RuntimeDirectScalarDescriptor } from '../runtime-state.js';
import { collectDirectApproximateLookupCandidates, collectIndexedExactLookupCandidates } from './formula-binding-lookup-candidates.js';
import { type ParsedCompiledFormula } from './formula-binding-direct-descriptors.js';
import type { FormulaBindingDependencyMaterializer } from './formula-binding-dependency-materializer.js';
import type { CreateEngineFormulaBindingServiceArgs, FormulaOwnerPosition } from './formula-binding-service-types.js';
import { classifyInlineScalarFastPlan } from './formula-leaf-inline-scalar-evaluator.js';
export interface PreparedFormulaBinding {
    readonly compiled: ParsedCompiledFormula;
    readonly dependencies: MaterializedDependencies;
    readonly directLookup: RuntimeDirectLookupDescriptor | undefined;
    readonly directAggregate: RuntimeDirectAggregateDescriptor | undefined;
    readonly directScalar: RuntimeDirectScalarDescriptor | undefined;
    readonly directCriteria: RuntimeDirectCriteriaDescriptor | undefined;
    readonly inlineScalarFastPlanKind: ReturnType<typeof classifyInlineScalarFastPlan>;
    readonly inlineScalarArithmeticDeltaCoefficients: Float64Array | undefined;
    readonly inlineScalarFastPlanStringIds: Uint32Array | undefined;
    readonly inlineScalarPlanCellIndices: Uint32Array | undefined;
    readonly runtimeProgram: Uint32Array;
    readonly plan: CompiledPlanRecord;
    readonly templateId: number | undefined;
    readonly indexedExactLookupCandidates: ReturnType<typeof collectIndexedExactLookupCandidates>;
    readonly directApproximateLookupCandidates: ReturnType<typeof collectDirectApproximateLookupCandidates>;
}
export declare function prepareFormulaBindingFromCompiled(args: {
    readonly serviceArgs: CreateEngineFormulaBindingServiceArgs;
    readonly cellIndex: number;
    readonly ownerSheetName: string;
    readonly source: string;
    readonly compiledInput: ParsedCompiledFormula;
    readonly templateId: number | undefined;
    readonly ownerPosition?: FormulaOwnerPosition;
    readonly assumeFreshDirectAggregateLiteralInputs?: boolean;
    readonly resolveWorkbookDateSystem?: () => string | undefined;
    readonly normalizeLookupCompileMode: (compiled: ParsedCompiledFormula) => ParsedCompiledFormula;
    readonly dependencyMaterializer: FormulaBindingDependencyMaterializer;
    readonly ensureDependencyBuildCapacity: (cellCapacity: number, dependencyCapacity: number, symbolicRefCapacity?: number, symbolicRangeCapacity?: number) => void;
    readonly directAggregateContainsOwnerCell: (directAggregate: RuntimeDirectAggregateDescriptor | undefined, cellIndex: number, ownerPosition?: FormulaOwnerPosition) => boolean;
    readonly makeUnmanagedCompiledPlan: (source: string, compiled: CompiledFormula, templateId: number | undefined) => CompiledPlanRecord;
}): PreparedFormulaBinding;
