import { type CompiledFormula, type DirectAggregateCandidate, type ParsedCellReferenceInfo, type ParsedDependencyReference, type ParsedRangeReferenceInfo, type StructuralAxisTransform } from '@bilig/formula';
import type { EngineRuntimeState, RuntimeDirectAggregateDescriptor, RuntimeDirectCriteriaDescriptor, RuntimeDirectLookupDescriptor } from '../runtime-state.js';
import type { RegionGraph } from '../../deps/region-graph.js';
import type { ExactColumnIndexService } from './exact-column-index-service.js';
import type { SortedColumnSearchService } from './sorted-column-search-service.js';
export type ParsedCompiledFormula = CompiledFormula & {
    parsedDeps?: ParsedDependencyReference[];
    parsedSymbolicRefs?: ParsedCellReferenceInfo[];
    parsedSymbolicRanges?: ParsedRangeReferenceInfo[];
    directAggregateCandidate?: DirectAggregateCandidate;
};
export declare function renameDirectAggregateDescriptorSheet(args: {
    readonly descriptor: RuntimeDirectAggregateDescriptor;
    readonly oldSheetName: string;
    readonly newSheetName: string;
}): RuntimeDirectAggregateDescriptor;
export declare function rewriteDirectAggregateDescriptorForStructuralTransform(args: {
    readonly descriptor: RuntimeDirectAggregateDescriptor;
    readonly targetSheetName: string;
    readonly transform: StructuralAxisTransform;
    readonly regionGraph: RegionGraph;
}): RuntimeDirectAggregateDescriptor | undefined;
export declare function buildDirectCriteriaDescriptor(args: {
    readonly compiled: ParsedCompiledFormula;
    readonly source: string;
    readonly ownerSheetName: string;
    readonly workbook: Pick<EngineRuntimeState, 'workbook'>['workbook'];
    readonly ensureCellTracked: (sheetName: string, address: string) => number;
    readonly regionGraph: RegionGraph;
}): RuntimeDirectCriteriaDescriptor | undefined;
export declare function buildDirectAggregateDescriptor(args: {
    readonly compiled: ParsedCompiledFormula;
    readonly ownerSheetName: string;
    readonly workbook: Pick<EngineRuntimeState, 'workbook'>['workbook'];
    readonly regionGraph: RegionGraph;
}): RuntimeDirectAggregateDescriptor | undefined;
export declare function buildDirectLookupDescriptor(args: {
    readonly compiled: ParsedCompiledFormula;
    readonly ownerSheetName: string;
    readonly workbook: Pick<EngineRuntimeState, 'workbook'>['workbook'];
    readonly ensureCellTracked: (sheetName: string, address: string) => number;
    readonly preferColumnIndex: boolean;
    readonly exactLookup: Pick<ExactColumnIndexService, 'prepareUniformNumericVectorLookup' | 'prepareVectorLookup'>;
    readonly sortedLookup: Pick<SortedColumnSearchService, 'prepareVectorLookup'>;
}): RuntimeDirectLookupDescriptor | undefined;
export declare function hasLookupPlanInstruction(plan: readonly {
    opcode: string;
}[]): boolean;
