"use client" import { ChevronRight } from "lucide-react" import { useBetslipStore } from "@/lib/store/betslip-store" import { cn } from "@/lib/utils" const topMatches = [ { id: "tm1", league: "England - Premier League", time: "05:00 PM", homeTeam: "Nottingham Forest", awayTeam: "Liverpool", odds: { home: 4.09, draw: 3.93, away: 1.82 } }, { id: "tm2", league: "England - Premier League", time: "11:00 PM", homeTeam: "Man City", awayTeam: "Newcastle", odds: { home: 1.50, draw: 5.17, away: 5.93 } }, { id: "tm3", league: "England - Premier League", time: "06:00 PM", homeTeam: "Chelsea", awayTeam: "Burnley", odds: { home: 1.21, draw: 6.91, away: 11.50 } }, { id: "tm4", league: "Spain - LaLiga", time: "07:30 PM", homeTeam: "Arsenal", awayTeam: "Wolves", odds: { home: 1.56, draw: 4.16, away: 5.80 } }, { id: "tm5", league: "Italy - Serie A", time: "09:45 PM", homeTeam: "Inter Milan", awayTeam: "Napoli", odds: { home: 1.85, draw: 3.60, away: 4.20 } } ] export function TopMatches() { const { bets, addBet } = useBetslipStore() return (
{topMatches.map((match) => { const eventName = `${match.homeTeam} - ${match.awayTeam}` const leagueForBet = `Football - ${match.league}` const outcomes = [ { key: "1", label: "1", odds: match.odds.home }, { key: "x", label: "X", odds: match.odds.draw }, { key: "2", label: "2", odds: match.odds.away }, ] as const return (
{/* Top Label Ribbon */}
TOP
{match.league} {match.time}
{match.homeTeam}
VS
{match.awayTeam}
{outcomes.map(({ key, label, odds }) => { const betId = `${match.id}-${key}` const isSelected = bets.some((b) => b.id === betId) return ( ) })}
) })}
) }