<% @plans.each do |plan| %>
<% action = billing_mode ? plan_billing_action(
current_slug: current_slug,
target_plan: plan,
stripe_subscription_active: stripe_subscription_active?(subscription),
current_interval: current_interval
) : nil %>
<%= plan.name %>
<% if plan.slug == "free" %>
€0
<% elsif plan.slug == "premium_light" %>
<% light_yearly = Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "yearly") %>
<% light_monthly = Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "monthly") %>
<%= light_yearly %>
oppure <%= light_monthly %>
<% else %>
<% full_yearly = Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "yearly") %>
<% full_monthly = Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "monthly") %>
<%= full_yearly %>
oppure <%= full_monthly %>
<% end %>
- Responsabili trasmissione: <%= plan.max_staff_transmission || "illimitato" %> / anno per squadra
- Partite: <%= plan.concurrent_streams_limit || "illimitate" %> in contemporanea (tutta la società)
- Replay: <%= plan.recordings_enabled? ? "#{plan.recording_days} giorni" : "no" %>
- YouTube: <% if plan.slug == "premium_light" %>Match Live TV<% elsif plan.youtube_enabled? %>canale società<% else %>no<% end %>
<% if billing_mode %>
<% action_kind = action[:kind] %>
<% if action_kind == :current %>
<%= action[:label] %>
<% elsif action_kind == :contact || action_kind == :disabled %>
<%= action[:label] %>
<% elsif action_kind == :checkout_options || action_kind == :change_options || action_kind == :interval_switch %>
<% if billing_profile_blocks_premium?(club) %>
<%= billing_profile_incomplete_message(club) %>
<%= link_to "Completa dati di fatturazione",
public_club_billing_profile_path(club, plan: plan.slug),
class: "btn btn-primary" %>
<% else %>
<% plan_intervals_for_display(action[:intervals]).each do |interval| %>
<% btn_kind = action_kind == :checkout_options ? :checkout : :change %>
<%= link_to plan_interval_button_label(plan, interval, kind: btn_kind),
plan_interval_checkout_path(club, plan, interval),
class: plan_interval_button_class(interval) %>
<% end %>
<% end %>
<% if action_kind == :interval_switch && action[:current_interval].present? %>
Fatturazione attuale: <%= Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: action[:current_interval]) %>
<% end %>
<% end %>
<% elsif plan.slug == "free" %>
<%= link_to "Inizia gratis", public_signup_path, class: "btn btn-secondary" %>
<% else %>
<% plan_intervals_for_display(Billing::Stripe::PriceCatalog.available_intervals(plan_slug: plan.slug)).each do |interval| %>
<%= link_to "Registrati — #{Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: interval)}",
public_signup_path(plan: plan.slug, interval: interval),
class: plan_interval_button_class(interval) %>
<% end %>
<% end %>