import { formatDateEST } from "@/lib/timezoneUtils";
import { Badge } from "@/components/ui/badge";

export default function ARCApplicationsSection({ data }: { data: any[] }) {
  return (
    <div className="space-y-4">
      <h2 className="text-xl font-bold text-foreground border-b pb-2">ARC Applications</h2>
      <div className="space-y-3">
        {data.map((item) => (
          <div key={item.id} className="p-4 bg-muted/30 rounded-lg border">
            <div className="flex items-start justify-between">
              <div>
                <p className="font-semibold text-foreground">{item.title}</p>
                <p className="text-xs text-muted-foreground mt-1">
                  {item.submitted_date ? formatDateEST(item.submitted_date) : "-"}
                  {item.project_type && ` · ${item.project_type}`}
                </p>
              </div>
              <Badge variant="outline">{item.status}</Badge>
            </div>
            {item.description && (
              <p className="text-sm text-muted-foreground mt-2">{item.description}</p>
            )}
          </div>
        ))}
      </div>
    </div>
  );
}
