import { RotateCcw } from 'lucide-react'
import type { BranchResponse } from '@/types/branching'

interface BranchRevivalCardProps {
  branch: BranchResponse
  evidenceSource: BranchResponse | null
}

export function BranchRevivalCard({ branch, evidenceSource }: BranchRevivalCardProps) {
  if (branch.status !== 'revived') return null

  return (
    <div className="bg-warning-dim border border-warning/20 rounded-md px-3 py-2 my-2">
      <div className="flex items-center gap-2 text-sm">
        <RotateCcw size={14} className="text-warning" />
        <span className="text-warning font-medium">Branch Revived</span>
      </div>
      {branch.evidence_description && (
        <p className="text-xs text-primary mt-1">{branch.evidence_description}</p>
      )}
      {evidenceSource && (
        <p className="text-xs text-muted-foreground mt-0.5">Evidence from: {evidenceSource.label}</p>
      )}
    </div>
  )
}
