<% content_for :title, "Abbonamento — #{@club.name}" %>
<% content_for :robots, "noindex, nofollow" %>

<div class="wrap" style="padding-top:20px">
  <h1>Abbonamento</h1>
  <%= render "shared/club_subscription_status", club: @club, entitlements: @entitlements, subscription: @subscription, on_billing_page: true %>

  <% if @subscription&.admin_comped? %>
    <div class="card" style="margin-top:16px;border-color:#3d3520;background:#1a1810">
      <p style="margin:0;color:#ddd">
        <strong>Abbonamento omaggio Match Live TV</strong>
        — piano <strong><%= @subscription.plan.name %></strong>
        <% if @subscription.admin_comped_reason.present? %>
          (<%= @subscription.admin_comped_reason %>)
        <% end %>.
        Non è richiesto alcun pagamento. Per modifiche o passaggio a un piano a pagamento, contatta
        <%= mail_to "info@matchlive.it", "info@matchlive.it" %>.
      </p>
    </div>
  <% else %>
    <%= render "shared/stripe_secure_payment" %>
    <% if MatchLiveTv.stripe_enabled? %>
      <%= render "shared/plan_change_info", subscription: @subscription %>
    <% end %>
    <%= render "shared/plan_cards", show_stripe_portal: false %>
    <%= render "shared/subscription_cancel", club: @club, subscription: @subscription %>
  <% end %>

  <%= render "shared/billing_documents", club: @club, payments: @payments %>

  <p style="margin-top:24px"><%= link_to "← Società", public_club_path(@club) %></p>
</div>
