import { CandidateCardData } from "@/lib/types"; type CandidateCardProps = { card: CandidateCardData; onAction?: (actionMessage: string, actionLabel: string) => void; }; export function CandidateCard({ card, onAction }: CandidateCardProps) { const tags = Array.isArray(card.tags) ? card.tags : []; const actions = Array.isArray(card.actions) ? card.actions : []; return (

{card.title}

{card.subtitle ?

{card.subtitle}

: null} {tags.length ? (
{tags.map((tag) => ( {tag} ))}
) : null} {card.meta ? (

{Object.entries(card.meta) .filter(([, value]) => value !== null && value !== undefined && value !== "") .map(([key, value]) => `${key}: ${String(value)}`) .join(" | ")}

) : null} {actions.length ? (
{actions.slice(0, 2).map((action) => ( ))}
) : null}
); }