import type { FormulaFamilyKey, FormulaFamilyMember, FormulaFamilyMembership, FormulaFamilyRunAxis, FormulaFamilyRunId } from './formula-family-store.js';
export interface MutableFormulaFamilyMemberRun {
    id: FormulaFamilyRunId;
    axis: FormulaFamilyRunAxis;
    fixedIndex: number;
    start: number;
    end: number;
    step: number;
    cellIndices: number[];
}
export interface MutableFormulaFamily {
    id: number;
    sheetId: number;
    templateId: number;
    shapeKey: string;
    key: string;
    runs: MutableFormulaFamilyMemberRun[];
    rowRunsByFixedIndex: Map<number, MutableFormulaFamilyMemberRun[]>;
    columnRunsByFixedIndex: Map<number, MutableFormulaFamilyMemberRun[]>;
    singletonRunsByRow: Map<number, MutableFormulaFamilyMemberRun[]>;
    rowAppendRunByFixedIndex: Array<MutableFormulaFamilyMemberRun | undefined>;
    recentAppendRun: MutableFormulaFamilyMemberRun | undefined;
}
export interface FormulaFamilyCellRecord extends FormulaFamilyKey, FormulaFamilyMember {
}
export interface FormulaFamilyRunDescriptor {
    readonly axis: FormulaFamilyRunAxis;
    readonly fixedIndex: number;
    readonly start: number;
    readonly end: number;
    readonly step: number;
    readonly members: readonly FormulaFamilyMember[];
}
export type FormulaRunFastPath = {
    readonly kind: 'append';
    readonly run: MutableFormulaFamilyMemberRun;
} | {
    readonly kind: 'create';
};
export declare function indexRun(family: MutableFormulaFamily, run: MutableFormulaFamilyMemberRun): void;
export declare function unindexRun(family: MutableFormulaFamily, run: MutableFormulaFamilyMemberRun): void;
export declare function hasDuplicateRunMemberCellIndex(members: readonly FormulaFamilyMember[]): boolean;
export declare function describeFreshOrderedUniformRun(members: readonly FormulaFamilyMember[], membershipFamilyIds: readonly number[]): Omit<FormulaFamilyRunDescriptor, 'members'> | undefined;
export declare function describeFreshFormulaRunMemberSegmentsInOrder(members: readonly FormulaFamilyMember[], membershipFamilyIds: readonly number[]): FormulaFamilyRunDescriptor[] | undefined;
export declare function describeFormulaRunMembers(members: readonly FormulaFamilyMember[]): FormulaFamilyRunDescriptor | undefined;
export declare function getFormulaRunFastPath(family: MutableFormulaFamily, descriptor: FormulaFamilyRunDescriptor): FormulaRunFastPath | undefined;
export declare function appendFormulaRunMembers(family: MutableFormulaFamily, run: MutableFormulaFamilyMemberRun, descriptor: FormulaFamilyRunDescriptor): void;
export declare function canRegisterFreshOrderedRunWithoutMerging(family: MutableFormulaFamily, descriptor: Omit<FormulaFamilyRunDescriptor, 'members'>, members: readonly FormulaFamilyMember[]): boolean;
export declare function runRowStart(run: MutableFormulaFamilyMemberRun): number;
export declare function removeMapArrayValue<K, V>(map: Map<K, V[]>, key: K, value: V): void;
export declare function candidateRunsForMember(family: MutableFormulaFamily, member: FormulaFamilyMember): MutableFormulaFamilyMemberRun[];
export declare function tryMergeRun(family: MutableFormulaFamily, runIndex: number, run: MutableFormulaFamilyMemberRun, member: FormulaFamilyMember, appendMemberToRun: (family: MutableFormulaFamily, run: MutableFormulaFamilyMemberRun, member: FormulaFamilyMember) => FormulaFamilyMembership, replaceRunWithMembers: (family: MutableFormulaFamily, runIndex: number, axis: FormulaFamilyRunAxis, fixedIndex: number, members: readonly FormulaFamilyMember[], memberCellIndex: number) => FormulaFamilyMembership, getCellRecord: (cellIndex: number) => FormulaFamilyCellRecord | undefined): FormulaFamilyMembership | undefined;
export declare function inferRunStep(axis: FormulaFamilyRunAxis, members: readonly FormulaFamilyMember[]): number;
export declare function canAppendStridedRunMember(run: MutableFormulaFamilyMemberRun, memberIndex: number): boolean;
export declare function sortRunMembers(axis: FormulaFamilyRunAxis, members: readonly FormulaFamilyMember[]): FormulaFamilyMember[];
export declare function groupRunMembersByStep(axis: FormulaFamilyRunAxis, members: readonly FormulaFamilyMember[], step: number): FormulaFamilyMember[][];
