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

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

<% if @matches.any? %> <% tournament_matches_grouped_by_date(@matches).each do |date, matches| %>

<%= date ? l(date, format: :long) : t("tournaments.hub.stream_plan_unscheduled") %>

<% matches.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 %> <% else %>

<%= t("tournaments.hub.no_matches") %>

<% end %>
<% if @recordings.any? %>

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

<% @recordings.each do |rec| %> <% match = rec.stream_session.match %> <%= link_to public_replay_path(rec.stream_session_id), class: "replay-card" do %>
<% if rec.thumbnail_url %> <% else %> <% end %> <% if rec.duration_label.present? %> <%= rec.duration_label %> <% end %>
<% phase = [match.tournament_round&.name, match.tournament_group&.name].compact.first %> <%= match.matchup_label %>

<%= [phase, rec.recorded_at_or_fallback && l(rec.recorded_at_or_fallback, format: :short)].compact.join(" · ") %>

<% end %> <% end %>
<% end %>