interface AsciiChartProps {
  data: number[]
  label: string
}

export function AsciiChart({ data, label }: AsciiChartProps) {
  const max = Math.max(...data)
  return (
    <div className="font-mono text-xs">
      <div className="flex items-end gap-px h-16 mb-2">
        {data.map((value, i) => (
          <div key={i} className="w-1 bg-primary/60" style={{ height: `${(value / max) * 100}%` }} />
        ))}
      </div>
      <p className="text-muted-foreground">{label}</p>
    </div>
  )
}
