/**
 * Log entry from workflow
 */
export interface WorkflowLog {
  id: string;
  workflowId: string;
  message: string;
  type?: string;
  timestamp: number;
  status?: string;
  progress?: number;
  performance?: any;
  parentId?: string | null;
  operationId?: string | null;
}

/**
 * Props for the WorkflowStatus component
 */
export interface WorkflowStatusProps {
  /**
   * Optional className for custom styling
   */
  className?: string;
  
  /**
   * Array of log entries to extract status from
   */
  logs?: WorkflowLog[];
  
  /**
   * Workflow status from API response (e.g., "completed", "running", "stopped")
   */
  workflowStatus?: string;
  
  /**
   * Current round number from API response
   */
  currentRound?: number;
  
  /**
   * Whether the workflow is currently running (shows spinner)
   */
  isRunning?: boolean;
  
  /**
   * Latest statistics from the workflow (price, processing time, bytes sent/received)
   */
  latestStats?: {
    priceUsd?: number;
    processingTime?: number;
    bytesSent?: number;
    bytesReceived?: number;
  } | null;
}

export type WorkflowStatusType = 'started' | 'resumed' | 'stopped' | 'failed' | 'completed' | null;

