/**
 * Workflow Hook
 */

import { useState, useCallback } from 'react';

interface UseWorkflowOptions {
  getDefaultImageModel: () => string;
  getDefaultVideoModel: () => string;
}

export const useWorkflow = (options: UseWorkflowOptions) => {
  const [isAnalyzing, setIsAnalyzing] = useState(false);
  const [isExecuting, setIsExecuting] = useState(false);

  const runWorkflow = useCallback(async (userInput: string) => {
    setIsAnalyzing(true);
    try {
      // Workflow implementation would go here
      // For now, this is a placeholder
      console.log('Running workflow with input:', userInput);
    } finally {
      setIsAnalyzing(false);
      setIsExecuting(false);
    }
  }, []);

  return {
    isAnalyzing,
    isExecuting,
    runWorkflow,
    getDefaultImageModel: options.getDefaultImageModel,
    getDefaultVideoModel: options.getDefaultVideoModel,
  };
};
