import type { FormulaFamilyFreshUniformRunRegistrationArgs, FormulaFamilyRunAxis, FormulaFamilyMember, FormulaFamilyRunUpsertArgs, FormulaFamilyStore, FormulaFamilyStructuralSourceTransform } from '../../formula/formula-family-store.js';
import type { RuntimeFormula } from '../runtime-state.js';
import type { FormulaBindingFamilyShapeKeyCache } from './formula-binding-family-shape-key.js';
import type { InitialFormulaEntryRefSource } from './formula-initialization-refs.js';
export type DeferredInitialFormulaFamilyRun = Omit<FormulaFamilyRunUpsertArgs, 'members'> & {
    axis: FormulaFamilyRunAxis;
    fixedIndex: number;
    start: number;
    step: number;
    lastIndex: number;
    ordered: boolean;
    cellIndices: readonly number[];
    rows?: readonly number[];
    cols?: readonly number[];
};
type MutableDeferredInitialFormulaFamilyRun = Omit<DeferredInitialFormulaFamilyRun, 'cellIndices' | 'rows' | 'cols'> & {
    cellIndices: number[];
    rows?: number[];
    cols?: number[];
};
export type DeferredInitialFormulaFamilyRunMap = Map<number, Map<number, Map<number, MutableDeferredInitialFormulaFamilyRun>>> & {
    disabled?: boolean;
    firstSingletonRunRow?: number;
    multiMemberRunCount?: number;
    singletonRunCount?: number;
    singletonRunsShareRow?: boolean;
};
export declare function createDeferredInitialFormulaFamilyRunMap(): DeferredInitialFormulaFamilyRunMap;
export declare function collectDeferredInitialFormulaFamilyRuns(runs: DeferredInitialFormulaFamilyRunMap): DeferredInitialFormulaFamilyRun[];
export declare function flushDeferredInitialFormulaFamilyRuns(args: {
    readonly runs: DeferredInitialFormulaFamilyRunMap | undefined;
    readonly shouldDeferFormulaFamilyIndex: boolean;
    readonly deferFormulaFamilyIndexRuns?: ((runs: readonly DeferredInitialFormulaFamilyRun[]) => void) | undefined;
    readonly deferFormulaFamilyIndexRebuild?: (() => void) | undefined;
    readonly registerFormulaFamilyRun: (run: DeferredInitialFormulaFamilyRun) => void;
    readonly checkEvaluationBudget?: (() => void) | undefined;
}): void;
export declare function materializeDeferredFormulaFamilyRunMembers(run: DeferredInitialFormulaFamilyRun): FormulaFamilyMember[];
export declare function readFreshFormulaFamilyRunsFromRefs<Entry>(refs: InitialFormulaEntryRefSource<Entry>): {
    readonly runs: readonly DeferredInitialFormulaFamilyRun[] | undefined;
    readonly fallbackCount: number;
} | undefined;
export declare function noteDeferredFormulaFamilyRunMember(args: {
    readonly runs: DeferredInitialFormulaFamilyRunMap | undefined;
    readonly runtimeFormula: RuntimeFormula | undefined;
    readonly prepared: {
        readonly cellIndex: number;
        readonly sheetId: number;
        readonly row: number;
        readonly col: number;
        readonly templateId?: number;
    };
}): void;
export declare function registerDeferredFormulaFamilyRunNow(args: {
    readonly run: DeferredInitialFormulaFamilyRun;
    readonly registerFreshFormulaFamilyRun: (args: FormulaFamilyFreshUniformRunRegistrationArgs) => boolean;
    readonly upsertFormulaFamilyRun: (args: FormulaFamilyRunUpsertArgs) => void;
}): void;
export declare function registerDeferredFormulaFamilyIndexRunsNow(args: {
    readonly formulaFamilies: FormulaFamilyStore;
    readonly formulaFamilyShapeKeyCache: FormulaBindingFamilyShapeKeyCache;
    readonly runs: readonly DeferredInitialFormulaFamilyRun[];
    readonly structuralSourceTransforms?: ReadonlyMap<number, FormulaFamilyStructuralSourceTransform>;
}): void;
export {};
