import Link from "next/link" import { BarChart3, Target } from "lucide-react" import { FollowButton } from "@/components/follow-button" import { lotteryIcon } from "@/components/lottery-strip" import type { LotteryFeedEntry } from "@/lib/lokilab-feed" import { cn } from "@/lib/utils" export function LotteryCard({ entry, country, isFollowing, isAuthenticated, index, }: { entry: LotteryFeedEntry country: string isFollowing: boolean isAuthenticated: boolean index: number }) { const { lastDraw, lifetime } = entry const Icon = lotteryIcon(entry.id) const hits = new Set(lastDraw?.result ?? []) const base = index * 90 return (

{entry.name}

{lastDraw &&

{formatDate(lastDraw.date)}

}
{lastDraw && ( )}
{lastDraw ? (
{lastDraw.result.map((n, i) => ( ))} {lastDraw.bonus?.map((n, i) => ( ))}
) : (

Aucun tirage disponible.

)} {lastDraw?.pick ? (

Choix de Loki ยท {lastDraw.matched}/{lastDraw.result.length}

{lastDraw.pick.map((n, i) => ( {n} ))}
) : null}
{lifetime.picksTracked > 0 ? ( <> Loki : {(lifetime.winRate * 100).toFixed(0)}% sur{" "} {lifetime.picksTracked} ) : ( "Archives officielles" )} Statistiques
) } function Ball({ n, bonus, delay, title }: { n: number; bonus?: boolean; delay: number; title?: string }) { return ( {n} ) } function formatDate(iso: string): string { return new Date(iso + "T00:00:00").toLocaleDateString("fr-CA", { weekday: "long", day: "numeric", month: "long" }) }