@props(['tournament' => null])

@if($tournament)
<div class="sidebar-tournament" role="region" aria-label="Active tournament" data-countdown-to="{{ $tournament['starts_at'] ?? '' }}">
    <div class="tourney-game">{{ $tournament['game_name'] ?? 'Esports' }}</div>
    <div class="tourney-name">{{ $tournament['name'] ?? 'Tournament' }}</div>
    <div class="tourney-countdown" aria-live="polite">
        <div class="cd-unit"><div class="cd-val" data-cd="days">00</div><div class="cd-lbl">Day</div></div>
        <div class="cd-unit"><div class="cd-val" data-cd="hours">00</div><div class="cd-lbl">Hrs</div></div>
        <div class="cd-unit"><div class="cd-val" data-cd="mins">00</div><div class="cd-lbl">Min</div></div>
        <div class="cd-unit"><div class="cd-val" data-cd="secs">00</div><div class="cd-lbl">Sec</div></div>
    </div>
    <a href="{{ $tournament['url'] ?? '#' }}" class="tourney-cta">View Tournament</a>
</div>
@endif
