<% content_for :title, t("club.dashboard.title", name: @club.name) %> <% content_for :robots, "noindex, nofollow" %>
<% if @club.effective_logo_url.present? %> <%= image_tag @club.effective_logo_url, alt: "", class: "club-header-logo", width: 56, height: 56 %> <% end %>

<%= @club.name %>

<% if @entitlements %>

<%= t("club.dashboard.plan_label") %> <%= @entitlements.plan.name %> · <%= t("club.dashboard.teams_count_label") %> <%= @teams.size %>

<% end %>
<%= link_to t("club.dashboard.edit_club"), public_edit_club_path(@club), class: "btn btn-secondary" %> <%= link_to t("club.dashboard.subscription"), public_club_billing_path(@club), class: "btn btn-primary" %> <%= link_to t("club.dashboard.new_team"), public_new_club_team_path(@club), class: "btn btn-secondary" %> <% if Tournaments::Entitlements.new(@club).premium_full? %> <%= link_to t("club.dashboard.tournaments"), public_club_tournaments_path(@club), class: "btn btn-secondary" %> <% else %> <%= link_to public_club_billing_path(@club), class: "btn btn-secondary btn-gated", title: t("club.dashboard.tournaments_locked_hint") do %> <%= t("club.dashboard.tournaments") %> <% end %> <% end %> <%= link_to t("club.dashboard.live_streams"), public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %> <% if @entitlements&.can_access_recordings? %> <%= link_to t("club.dashboard.replay_archive"), public_club_recordings_path(@club), class: "btn btn-secondary" %> <% end %>
<%= render "public/clubs/youtube", club: @club, entitlements: @entitlements, entitlements_team: @entitlements_team %> <% if @replay_stats %>

<%= t("club.dashboard.replay_heading") %>

<%= @replay_stats[:available_count] %>
<%= t("club.dashboard.available") %>
<%= @replay_stats[:expiring_soon_count] %>
<%= t("club.dashboard.expiring_soon") %>
<%= number_to_human_size(@replay_stats[:total_bytes]) %>
<%= t("club.dashboard.space_used") %>
<%= @replay_stats[:total_views] %>
<%= t("club.dashboard.views") %>
<% end %>

<%= t("club.dashboard.teams_heading") %>

<% if @teams.any? %> <% @teams.each do |team| %> <% end %>
<%= t("club.dashboard.team_col") %><%= t("club.dashboard.branding_col") %>
<%= team.name %> <% if team.logo_url.present? || team.logo_file.attached? || team.primary_color.present? %> <%= t("club.dashboard.branding_custom") %> <% else %> <%= t("club.dashboard.branding_inherited") %> <% end %> <%= link_to t("club.dashboard.public_page"), public_team_page_path(team.slug), target: "_blank", rel: "noopener" %> · <%= link_to t("club.dashboard.details"), public_team_details_path(team) %> · <%= link_to t("club.dashboard.matches"), public_team_matches_path(team) %> · <%= link_to t("club.dashboard.edit"), public_edit_team_path(team) %>
<% else %>

<%= raw t("club.dashboard.no_teams_html", link: link_to(t("club.dashboard.add_first_team"), public_new_club_team_path(@club))) %>

<% end %>

<%= t("club.dashboard.footer_note") %>