import { useMemo } from 'react';
/**
 * create a parallel array of output names for the steps
 *
 * @param graph - The graph manager
 * @returns
 */ export function useStepOutputs(graph, defaultOutputName) {
    return useMemo(()=>graph.steps.map((s)=>s.id).map((id, index)=>{
            const output = graph.outputDefinitions.find((def)=>def.node === id);
            return output?.name ?? defaultOutputName?.(index);
        }), [
        graph.steps,
        graph.outputDefinitions,
        defaultOutputName
    ]);
}
