import type { Agent, Connection, TimelineEvent } from '../types/agent'

export const agents: Agent[] = [
  {
    id: 'erwin',
    name: 'Erwin',
    role: 'orchestrator',
    status: 'active',
    position: { x: 50, y: 50 },
    avatar: '🎯',
    currentTask: 'Coordinando misión de dashboard',
    connections: ['bulma', 'rocket', 'hiro', 'sherlock', 'claudia'],
    stats: { tasksCompleted: 12, tasksInProgress: 3, tasksBlocked: 0 }
  },
  {
    id: 'bulma',
    name: 'Bulma',
    role: 'architect',
    status: 'thinking',
    position: { x: 25, y: 30 },
    avatar: '🏗️',
    currentTask: 'Diseñando arquitectura del dashboard',
    connections: ['rocket', 'hiro'],
    stats: { tasksCompleted: 8, tasksInProgress: 2, tasksBlocked: 1 }
  },
  {
    id: 'rocket',
    name: 'Rocket',
    role: 'developer',
    status: 'active',
    position: { x: 15, y: 55 },
    avatar: '🚀',
    currentTask: 'Implementando componentes React',
    connections: ['erwin', 'sherlock'],
    stats: { tasksCompleted: 15, tasksInProgress: 4, tasksBlocked: 0 }
  },
  {
    id: 'hiro',
    name: 'Hiro',
    role: 'designer',
    status: 'idle',
    position: { x: 35, y: 70 },
    avatar: '🎨',
    currentTask: ' Diseñando interfaces UX',
    connections: ['erwin', 'bulma'],
    stats: { tasksCompleted: 6, tasksInProgress: 0, tasksBlocked: 0 }
  },
  {
    id: 'sherlock',
    name: 'Sherlock',
    role: 'reviewer',
    status: 'thinking',
    position: { x: 65, y: 35 },
    avatar: '🔍',
    currentTask: 'Revisando código de API',
    connections: ['erwin', 'rocket', 'claudia'],
    stats: { tasksCompleted: 20, tasksInProgress: 1, tasksBlocked: 0 }
  },
  {
    id: 'claudia',
    name: 'Claudia',
    role: 'assistant',
    status: 'completed',
    position: { x: 75, y: 60 },
    avatar: '📝',
    currentTask: 'Documentando endpoint REST',
    connections: ['erwin', 'sherlock'],
    stats: { tasksCompleted: 25, tasksInProgress: 0, tasksBlocked: 0 }
  }
]

export const connections: Connection[] = [
  // Erwin delegates to everyone
  { id: 'c1', from: 'erwin', to: 'bulma', type: 'delegates', active: true },
  { id: 'c2', from: 'erwin', to: 'rocket', type: 'delegates', active: true },
  { id: 'c3', from: 'erwin', to: 'hiro', type: 'delegates', active: false },
  { id: 'c4', from: 'erwin', to: 'sherlock', type: 'requests', active: false },
  { id: 'c5', from: 'erwin', to: 'claudia', type: 'requests', active: false },
  
  // Bulma reports to Erwin
  { id: 'c6', from: 'bulma', to: 'erwin', type: 'reports', active: true },
  
  // Bulma designs for Rocket and Hiro
  { id: 'c7', from: 'bulma', to: 'rocket', type: 'transfers', active: true },
  { id: 'c8', from: 'bulma', to: 'hiro', type: 'transfers', active: false },
  
  // Rocket reports to Erwin
  { id: 'c9', from: 'rocket', to: 'erwin', type: 'reports', active: true },
  
  // Rocket goes to Sherlock for review
  { id: 'c10', from: 'rocket', to: 'sherlock', type: 'requests', active: true },
  
  // Hiro reports to Erwin
  { id: 'c11', from: 'hiro', to: 'erwin', type: 'reports', active: false },
  
  // Sherlock reports findings to Erwin
  { id: 'c12', from: 'sherlock', to: 'erwin', type: 'reports', active: true },
  
  // Sherlock requests documentation from Claudia
  { id: 'c13', from: 'sherlock', to: 'claudia', type: 'requests', active: false },
  
  // Claudia reports to Erwin
  { id: 'c14', from: 'claudia', to: 'erwin', type: 'reports', active: true },
]

export const timelineEvents: TimelineEvent[] = [
  {
    id: 'e1',
    agentId: 'rocket',
    timestamp: new Date(Date.now() - 1000 * 60 * 5),
    type: 'task_start',
    description: 'Rocket started implementing MissionControlDashboard component'
  },
  {
    id: 'e2',
    agentId: 'bulma',
    timestamp: new Date(Date.now() - 1000 * 60 * 12),
    type: 'task_complete',
    description: 'Bulma completed architecture design document'
  },
  {
    id: 'e3',
    agentId: 'sherlock',
    timestamp: new Date(Date.now() - 1000 * 60 * 3),
    type: 'message',
    description: 'Sherlock requested code review from Rocket'
  },
  {
    id: 'e4',
    agentId: 'claudia',
    timestamp: new Date(Date.now() - 1000 * 60 * 15),
    type: 'task_complete',
    description: 'Claudia finished API documentation'
  },
  {
    id: 'e5',
    agentId: 'erwin',
    timestamp: new Date(Date.now() - 1000 * 60 * 2),
    type: 'task_start',
    description: 'Erwin initiated new dashboard coordination task'
  },
  {
    id: 'e6',
    agentId: 'bulma',
    timestamp: new Date(Date.now() - 1000 * 60 * 8),
    type: 'task_blocked',
    description: 'Bulma blocked on external API dependency'
  },
  {
    id: 'e7',
    agentId: 'rocket',
    timestamp: new Date(Date.now() - 1000 * 60 * 1),
    type: 'transfer',
    description: 'Rocket transferred completed work to Sherlock for review'
  }
]
