% content_for :title, t("team_pages.index.meta_title") %>
<% content_for :meta_description, t("team_pages.index.meta_description") %>
<% content_for :canonical_url, seo_absolute_url(public_team_pages_path(filter_params_for_canonical)) %>
<%= t("team_pages.index.heading") %>
<%= t("team_pages.index.hint") %>
<%= form_with url: public_team_pages_path, method: :get, local: true, class: "team-directory-filters" do %>
"
aria-label="<%= t("team_pages.index.search_aria_label") %>"
autocomplete="off"
/>
<%= t("team_pages.index.chips_label") %>
<% if @query.present? || @sport.present? || @live_filter || @replays_filter %>
<%= link_to t("team_pages.index.reset_link"), public_team_pages_path, class: "btn btn-secondary team-directory-filters__reset" %>
<% end %>
<% end %>
<% if @query.present? || @sport.present? || @live_filter || @replays_filter %>
<%= t("team_pages.index.results_found", count: @entries.size) %>
<% if @query.present? %><%= t("team_pages.index.results_query_suffix", query: @query) %><% end %>
<% if @sport.present? %><%= t("team_pages.index.results_sport_suffix", sport: Sports::Catalog.find_optional(@sport)&.dig(:label) || @sport) %><% end %>
<% else %>
<%= t("team_pages.index.results_active", count: @entries.size) %>
<% end %>
<% if @entries.any? %>
<% @entries.each do |entry| %>
<% team = entry.team %>
<% club = team.club %>
<% logo = team.effective_logo_url.presence || club.effective_logo_url %>
<%= link_to public_team_page_path(team.slug), class: "team-directory-card" do %>
<%= club.name %>
<%= team.name %>
<%= team.sport_label %>
<% if entry.live_now %>
<%= t("team_pages.index.badge_live") %>
<% end %>
<% if entry.upcoming_count.positive? %>
<%= t("team_pages.index.badge_upcoming", count: entry.upcoming_count) %>
<% end %>
<% if entry.replay_count.positive? %>
<%= t("team_pages.index.badge_replay", count: entry.replay_count) %>
<% end %>
<% end %>
<% end %>
<% else %>
<% if @query.present? || @sport.present? || @live_filter || @replays_filter %>
<%= t("team_pages.index.empty_filtered_title") %><%= t("team_pages.index.empty_filtered_suffix") %>
<%= link_to t("team_pages.index.empty_filtered_show_all"), public_team_pages_path, class: "btn btn-secondary" %>
<% else %>
<%= t("team_pages.index.empty_default_title") %>
<%= t("team_pages.index.empty_default_body") %>
<%= link_to t("team_pages.index.empty_default_live_link"), public_live_index_path, class: "btn btn-secondary", style: "margin-top:12px;display:inline-block" %>
<% end %>
<% end %>