import Link from "next/link"; import { TrendingUp, Calendar, User } from "lucide-react"; import { Bill } from "@/lib/types"; import { billLabel, cn, formatDate, partyBadgeColor, trendColor } from "@/lib/utils"; import { FollowButton } from "./FollowButton"; interface BillCardProps { bill: Bill; compact?: boolean; } export function BillCard({ bill, compact = false }: BillCardProps) { const label = billLabel(bill.bill_type, bill.bill_number); const score = bill.latest_trend?.composite_score; const tags = bill.latest_brief?.topic_tags?.slice(0, 3) || []; return (
{label} {bill.chamber} {tags.map((tag) => ( {tag} ))}

{bill.short_title || bill.title || "Untitled Bill"}

{!compact && bill.sponsor && (
{bill.sponsor.name} {bill.sponsor.party && ( {bill.sponsor.party} )} {bill.sponsor.state && ( {bill.sponsor.state} )}
)}
{score !== undefined && score > 0 && (
{Math.round(score)}
)}
{!compact && bill.latest_action_text && (

{formatDate(bill.latest_action_date)} — {bill.latest_action_text}

)}
); }