window.AdCard = function AdCard({ ad, selected, onToggle, onExpand, minimal }) { const p = PLATFORMS[ad.platform] || PLATFORMS.foreplay; const hasTranscript = ad.transcript && ad.transcript.length > 0; const hasVideo = !!ad.creativeUrl; const showVideoThumb = hasVideo && !ad.thumbnailUrl; const score = ad.score; const scoreText = (typeof score === 'number') ? (score > 10 ? Math.round(score) : score.toFixed(1)) : null; const metricChips = RESILIA_ADAPT.metricChips(ad); const openExpand = (e) => { e.stopPropagation(); onExpand(ad); }; return (
{showVideoThumb && (
{!minimal && (
{ad.brand} {hasTranscript && ( )}
{ad.directionLabel && (
{ad.directionLabel}
)}
{ad.copy}
{scoreText !== null && ( {scoreText} )} {metricChips.map(({ label, value, title, className }) => ( {label} {value} ))} {ad.daysRunning ? {ad.daysRunning}d running : null}
)} {minimal && (
{ad.brand}
{scoreText !== null && ( {scoreText} )}
)}
); };