/**
 * Shared types for V2 Dashboard components
 */

export interface ChatMessage {
  sender: 'iris' | 'user'
  text: string
  ts: string
  tool?: string
}

export interface TaskItem {
  id: string
  title: string
  agent: string
  priority: 'high' | 'medium' | 'low'
  status: 'active' | 'pending' | 'blocked'
  progress: number  // 0–100
  detail?: string | null
  source?: string
}

/* ── Agent Detail Modal Types ─────────────────── */

export interface ThinkingItem {
  type: 'thought' | 'action' | 'result'
  text: string
  ts: string
}

export interface AgentActivityItem {
  time: string
  text: string
}

/** Dashboard view-model for an agent detail modal */
export interface AgentDetailData {
  id: string
  name: string
  role: string
  roleBadge: string
  model: string
  status: 'work' | 'think' | 'idle'
  statusLabel: string
  task: string | null
  goal: string | null
  progress: number
  elapsed: string
  next: string
  tokens: string
  cost: string
  think: string | null
  md?: string
  tokensToday: number
  costToday: number
  workload: number
  uptime: string
  lastActive: string
  activeTaskCount: number
  thinking: ThinkingItem[]
  activity: AgentActivityItem[]
  availableModels: { id: string; alias: string }[]
}
