<% @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,
subscription: subscription
) : nil %>
<%= render "shared/plan_title", plan: plan %>
<% 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 %>
<%= raw t("pages.plans.price_alt_html", price: 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 %>
<%= raw t("pages.plans.price_alt_html", price: full_monthly) %>
<% end %>
- <%= raw t("pages.plans.staff_html", count: plan.max_staff_transmission || t("pages.plans.staff_unlimited")) %>
- <%= raw t("pages.plans.matches_html", count: plan.concurrent_streams_limit || t("pages.plans.matches_unlimited")) %>
- <%= raw t(
"pages.plans.replay_html",
value: plan.recordings_enabled? ? t("pages.plans.replay_days", count: plan.recording_days) : t("pages.plans.replay_none")
) %>
- <%= raw t(
"pages.plans.youtube_html",
value: if plan.slug == "premium_light"
t("pages.plans.youtube_mltv")
elsif plan.youtube_enabled?
t("pages.plans.youtube_club")
else
t("pages.plans.youtube_none")
end
) %>
<% if billing_mode %>
<% action_kind = action[:kind] %>
<% if action_kind == :current %>
<%= action[:label] %>
<% elsif action_kind == :none %>
<% elsif action_kind.in?(%i[contact 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 t("pages.plans.complete_billing"),
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_options : action_kind %>
<%= 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 %>
<% end %>
<% elsif plan.slug == "free" %>
<%= link_to t("pages.plans.start_free"), 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 t("pages.plans.register_with_price", price: 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 %>