import { useCallback, useState } from 'react';
export function useGraphWorkflowState(graph) {
    const [workflow, setWorkflow] = useState(graph.workflow);
    return [
        workflow,
        useCallback((w)=>{
            setWorkflow(w);
            graph.reset(w);
        }, [
            setWorkflow,
            graph
        ]), 
    ];
}
