import { type CompiledFormula, type StructuralAxisTransform } from '@bilig/formula';
import type { FormulaInstanceSnapshot } from './formula-instance-table.js';
import type { FormulaTemplateSnapshot } from './template-bank.js';
export declare function retargetFormulaInstance(record: FormulaInstanceSnapshot, next: {
    readonly sheetName?: string;
    readonly row?: number;
    readonly col?: number;
    readonly source?: string;
    readonly templateId?: number;
}): FormulaInstanceSnapshot;
export interface StructurallyRewrittenTemplate {
    readonly templateId: number;
    readonly baseRow: number;
    readonly baseCol: number;
    readonly source: string;
    readonly compiled: CompiledFormula;
    readonly reusedProgram: boolean;
}
export declare function rewriteTemplateForStructuralTransform(args: {
    readonly template: FormulaTemplateSnapshot;
    readonly ownerSheetName: string;
    readonly targetSheetName: string;
    readonly transform: StructuralAxisTransform;
}): StructurallyRewrittenTemplate | undefined;
export declare function retargetStructurallyRewrittenTemplateInstance(args: {
    readonly rewrittenTemplate: StructurallyRewrittenTemplate;
    readonly ownerRow: number;
    readonly ownerCol: number;
}): {
    readonly source: string;
    readonly compiled: CompiledFormula;
    readonly reusedProgram: boolean;
};
