import type { Article } from '../api/articles'; interface ArticleCardProps { article: Article; onClick: (article: Article) => void; onToggleRead: (id: string, is_read: boolean) => void; onToggleFavorite: (id: string) => void; } export function ArticleCard({ article, onClick, onToggleRead, onToggleFavorite }: ArticleCardProps) { const timeToRead = Math.ceil((article.content?.length || 500) / 1000) + 1; return (
onClick(article)}> {/* Unread Ribbon - Polished Wrapping Effect */} {!article.is_read && (
{/* The Ribbon Itself */}
Nouveau
{/* Darker Folds for "Wrapping" Effect (Simulated behind the card) */}
)} {!article.is_read && ( /* External fold bits to cover the corner if needed for perfection */ <>
)} {/* Image Placeholder with Gradient Overlay */}
{/* Visual placeholder or real image */}
{/* Meta on top of image */}
{article.feed_title || 'Journal'} {timeToRead} min
{/* Content */}

{article.title}

{article.summary && (

{article.summary.replace(/<[^>]*>?/gm, '').substring(0, 160)}...

)}
{new Date(article.published_at || article.created_at).toLocaleDateString('fr-FR', { day: 'numeric', month: 'short', hour: '2-digit', minute: '2-digit' })}
); }