import { Link } from 'react-router-dom'
import { MOCK_CHAMADOS } from '../mock'

export default function ChamadosList() {
  return (
    <>
      <h2 className="page-title">Chamados</h2>
      <p className="page-lead">Fila de trabalho — hub de investigação CH-*</p>
      {MOCK_CHAMADOS.map((c) => (
        <Link key={c.public_id} to={`/chamados/${c.public_id}`} style={{ display: 'block' }}>
          <div className="card" style={{ cursor: 'pointer' }}>
            <strong>{c.public_id}</strong> · {c.domain} · <span className="badge">{c.status}</span>
            {c.sources.map((s) => (
              <span key={s} className={`badge badge-${s}`} style={{ marginLeft: '0.35rem' }}>{s}</span>
            ))}
          </div>
        </Link>
      ))}
    </>
  )
}
