import { useEffect, useState } from 'react';
/**
 * Gets the graph processing steps
 * @param graph - the graph manager
 * @returns
 */ export function useGraphSteps(graph) {
    const [steps, setSteps] = useState([]);
    // listen for graph changes and update the steps
    useEffect(()=>graph.onChange(()=>setSteps(graph.steps)), [
        graph,
        setSteps
    ]);
    return steps;
}
