
<table>
        <thead>
            <tr>
                <th scope="col">GAME DATE</th>
                <th scope="col">SPORT</th>
                <th scope="col">TEAMS</th>
                <th scope="col">SCORE</th>
                <th scope="col">BET TYPE</th>
                <th scope="col">DESCRIPTION</th>
                <th scope="col">RESULT</th>
            </tr>
        </thead>
        <tbody>
        <?php 
            if( have_rows('repeater') ):
                while( have_rows('repeater') ) : the_row();

                    // Variables
                    $game_date = get_sub_field('game_date');
                    $sport = get_sub_field('sport');    
                    $home_team = get_sub_field('home_team');
                    $visitor_team = get_sub_field('visitor_team');
                    $score = get_sub_field('score');
                    $bet_type = get_sub_field('bet_type');
                    $description = get_sub_field('description');
                    $result = get_sub_field('result');
        ?>
            <tr>
                <td data-label="Date"><?= $game_date; ?></td>
                <td data-label="Sport" class="sport"><?= $sport; ?></td>
                <td data-label="Teams" class="teams">
                    <div class="team-wrapper">
                        <p class="team"><?= $home_team; ?></p> @ <p class="team"><?= $visitor_team; ?></p></td>
                    </div>
                <td data-label="Score" class="score"><?= $score; ?></td>
                <td data-label="Bet Type" class="bet-type"><?= $bet_type; ?></td>
                <td data-label="Description" class="description"><?= $description; ?></td>
            <?php if ($result === 'win') : ?>
                <td data-label="Result"><span class="win">Win</span></td>
            <?php elseif ($result === 'lose') : ?>
                <td data-label="Result"><span class="lose">Lose</span></td>
            <?php else : ?>
                <td data-label="Result"><span class="draw">Draw</span></td>
            <?php endif; ?>

            </tr>
            <?php 
                endwhile;
                endif;
            ?>
        </tbody>
    </table>

    
