/**
 * BlockerReport - Render blocker report
 *
 * @module packages/tui/src/components/BlockerReport
 */

export interface BlockerReportProps {
  task_id: string
  title: string
  reason: string
  escalation: 'none' | 'architecture_designer' | 'main_agent' | 'user'
  suggestions?: string[]
}

export function BlockerReport({ task_id, title, reason, escalation, suggestions }: BlockerReportProps): string {
  const lines: string[] = [
    '🚫 BLOCKER DETECTED',
    `Task:   ${task_id}`,
    `Title:  ${title}`,
    `Reason: ${reason}`,
    `Escalated to: ${escalation}`,
    ''
  ]

  if (suggestions && suggestions.length > 0) {
    lines.push('Suggestions:')
    for (const s of suggestions) lines.push(`  • ${s}`)
  } else {
    lines.push('(no automated suggestions available)')
  }

  return lines.join('\n')
}
