<% content_for :title, t("matches.index.title", name: @team.name) %> <% content_for :robots, "noindex, nofollow" %>

<%= t("matches.index.heading", name: @team.name) %>

<%= t("matches.index.lead") %>

<%= link_to t("matches.index.schedule_match"), new_public_team_match_path(@team), class: "btn btn-primary" %> <%= link_to t("matches.index.team_details"), public_team_details_path(@team), class: "btn btn-secondary" %> <%= link_to t("matches.index.live_and_schedule"), public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
<% if @matches.any? %> <% @matches.each do |match| %> <% end %>
<%= t("matches.index.col_opponent") %> <%= t("matches.index.col_datetime") %> <%= t("matches.index.col_location") %> <%= t("matches.index.col_status") %>
<%= match.opponent_name %> <% if match.scheduled_at %> <%= l_local(match.scheduled_at) %> <% else %> <%= t("matches.index.no_time") %> <% end %> <%= match.location.presence || "—" %> <% label = match.public_status_label %> <% if match.active_stream_session %> <%= label %> <% else %> <%= label %> <% end %> <%= link_to t("matches.index.edit"), edit_public_team_match_path(@team, match) %> <% if match.deletable? %> · <%= button_to t("matches.index.delete"), public_team_match_path(@team, match), method: :delete, form: { data: { turbo_confirm: t("matches.index.delete_confirm"), confirm_kind: "delete" } }, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem;display:inline" %> <% end %>
<% else %>

<%= raw t("matches.index.empty_html", link: link_to(t("matches.index.schedule_first"), new_public_team_match_path(@team))) %>

<% end %>