<% visible_rounds = @rounds.select { |round| (@matches_by_round[round.id] || []).any? } %>

<%= t("tournaments.page.tabs.tabellone") %>

<% @groups.each do |group| %>

<%= group.name %> — <%= t("tournaments.hub.standings") %>

<% @standings_by_group[group].each_with_index do |row, idx| %> <% end %>
<%= t("tournaments.hub.played") %> <%= t("tournaments.hub.won") %> <%= t("tournaments.hub.lost") %> <%= t("tournaments.hub.points") %>
<%= idx + 1 %>. <%= tournament_team_chip(row.participant) %> <%= row.played %> <%= row.won %> <%= row.lost %> <%= row.points %>
<% end %> <% visible_rounds.each do |round| %>

<%= round.name %>

<% @matches_by_round[round.id].each do |match| %> <%= render "public/tournament_pages/board_row", match: match %> <% end %>
<%= t("tournaments.hub.datetime") %> <%= t("tournaments.hub.court") %> <%= t("tournaments.hub.stream_plan_match") %> <%= t("tournaments.page.score") %> <%= t("tournaments.hub.stream_plan_live_col") %>
<% end %> <% if @groups.none? && visible_rounds.none? %>

<%= t("tournaments.page.bracket_empty") %>

<% end %>