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

export default function BoardVotesSection({ data }: { data: any[] }) {
  return (
    <div className="space-y-4">
      <h2 className="text-xl font-bold text-foreground border-b pb-2">Board Votes</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 || item.motion}</p>
                <p className="text-xs text-muted-foreground mt-1">
                  Result: {item.result || item.status || "-"}
                </p>
              </div>
              <Badge variant="outline">{item.status || "recorded"}</Badge>
            </div>
          </div>
        ))}
      </div>
    </div>
  );
}