import React from 'react'
import styled from 'styled-components/macro'
import type { Match } from 'features/HeaderFilters'
import { getSportColor } from 'helpers'
import { SportName } from 'features/Common'
import { T9n } from 'features/T9n'
import { useCard } from '../hooks'
import { CardFinishedHover } from '../CardFinishedHover'
import {
CardWrapper,
Info,
MatchStatus as CommonMatchStatus,
Preview,
PreviewWrapper,
Score,
Team,
TeamName,
Teams,
TournamentName,
} from '../styled'
const MatchStatus = styled(CommonMatchStatus)`
color: #313131;
background-color: #EACB6F;
`
type CardFinishedProps = {
match: Match,
}
export const CardFinished = ({
match: {
date,
preview,
sportName,
sportType,
team1Name,
team1Score,
team2Name,
team2Score,
tournamentName,
},
}: CardFinishedProps) => {
const {
close,
isOpen,
onKeyPress,
open,
showScore,
} = useCard()
if (isOpen) return
return (
{tournamentName}
{team1Name}
{showScore && {team1Score}}
{team2Name}
{showScore && {team2Score}}
)
}