'use client';

export default function RecentTestResults() {
  const results = [
    { id: 1, patientName: 'John Doe', testType: 'Blood Test', status: 'Completed' },
    { id: 2, patientName: 'Jane Smith', testType: 'Urine Test', status: 'Pending' },
    { id: 3, patientName: 'Mark Johnson', testType: 'X-ray', status: 'Completed' },
  ];

  return (
    <div className="bg-white p-4 rounded-lg shadow">
      <h3 className="text-lg font-semibold mb-3">Recent Test Results</h3>
      <ul className="space-y-3">
        {results.map((result) => (
          <li key={result.id} className="flex justify-between items-center border-b pb-2">
            <div>
              <p className="text-sm">{result.patientName}</p>
              <p className="text-sm text-gray-500">{result.testType}</p>
            </div>
            <span
              className={`text-sm ${result.status === 'Completed' ? 'text-green-500' : 'text-red-500'}`}
            >
              {result.status}
            </span>
          </li>
        ))}
      </ul>
    </div>
  );
}
