% content_for :title, t("tournaments.page.title", name: @tournament.name, club: @club.name) %>
<% content_for :robots, @tournament.published? ? "index, follow" : "noindex, nofollow" %>
<% content_for :canonical_url, seo_absolute_url(public_tournament_page_path(@tournament.slug)) if @tournament.published? %>
<%= link_to t("tournaments.page.back_to_list"), public_tournament_pages_path, class: "back-link" %>
<% logo = @tournament.effective_logo_url %>
<% if logo.present? %>
<%= image_tag logo, alt: "", class: "tournament-public-hero__logo", width: 56, height: 56 %>
<% else %>
<%= @tournament.name.to_s.first %>
<% end %>
<%= @club.name %>
<%= @tournament.name %>
<%= @tournament.sport_label %>
· <%= l(@tournament.starts_on) %> – <%= l(@tournament.ends_on) %>
<% if @tournament.venue.present? %> · <%= @tournament.venue %><% end %>
<% if @owner_preview %>
<%= t("tournaments.page.draft_banner") %>
<% end %>
<% if @owner_manage %>
<%= link_to t("tournaments.index.open"), public_tournament_path(@tournament), class: "btn btn-secondary tournament-public-hero__manage" %>
<% end %>
<% if @live_sessions.any? %>
<%= t("tournaments.page.section_live") %>
<% @live_sessions.each do |session| %>
<% match = session.match %>
<% on_air = @online_paths.include?(session.mediamtx_path_name) %>
<%= live_match_card_heading(match, link_team: false) %>
<% if match.court_or_location.present? %><%= match.court_or_location %> · <% end %>
Match Live TV
<% if session.score_state %>
<%= live_score_sets_label(session.score_state, match) %>
<% if live_score_partials_label(session.score_state).present? %>
<%= t("score.partials_prefix", value: live_score_partials_label(session.score_state)) %>
<% end %>
<%= session.score_state.home_points %> - <%= session.score_state.away_points %>
<% end %>
<% if on_air %>
<%= t("live.index.badge_on_air") %>
<% elsif session.paused? %>
<%= t("live.index.badge_paused") %>
<% else %>
<%= t("live.index.badge_live") %>
<% end %>
<%= link_to t("tournaments.page.watch_live"), public_live_path(session), class: "btn-watch" %>
<% end %>
<% end %>
<%= render "public/tournament_pages/tab_#{@tab}" %>