/**
 * 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;
}

/**
 * Dashboard log tree structure
 */
export interface DashboardLogTree {
  operations: Map<string, {
    logs: Map<string, WorkflowLog>;
    parentId: string | null;
    expanded: boolean;
    latestProgress: number | null;
    latestStatus: string | null;
    operationName: string | null;
    latestMessage: string | null;
  }>;
  rootOperations: string[];
  logExpandedStates: Map<string, boolean>;
  currentRound: number | null;
}

/**
 * Props for the Log component
 */
export interface LogProps {
  /**
   * Optional className for custom styling
   */
  className?: string;
  
  /**
   * Empty state message when no logs are available
   * @default "No log information available"
   */
  emptyMessage?: string;
  
  /**
   * Dashboard log tree (logs with operationId)
   */
  dashboardTree?: DashboardLogTree;
  
  /**
   * Callback to toggle operation expanded state
   */
  onToggleOperationExpanded?: (operationId: string) => void;
  
  /**
   * Function to get child operations for a parent
   */
  getChildOperations?: (parentId: string | null) => string[];
}

