<%# locals: (club: nil, entitlements: nil, subscription: nil, current_plan_slug: nil, show_stripe_portal: false) %> <% club ||= @club %> <% entitlements ||= @entitlements %> <% subscription ||= @subscription %> <% current_slug = local_assigns.fetch(:current_plan_slug, nil).presence || entitlements&.plan&.slug || subscription&.plan&.slug || "free" %> <% current_interval = subscription&.billing_interval %> <% billing_mode = club.present? %>
<% @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 %> <% featured = plan.slug == "premium_full" %>
"> <% if featured %>

<%= t("pages.plans.recommended_badge") %>

<% end %> <%= render "shared/plan_title", plan: plan %> <% if plan.slug == "free" %>
€0
<% else %> <% yearly = Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "yearly") %> <% monthly = Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "monthly") %> <% list = Billing::Stripe::PriceCatalog.list_label(plan_slug: plan.slug, interval: "yearly") %> <% equiv = Billing::Stripe::PriceCatalog.equivalent_monthly_label(plan_slug: plan.slug) %>
<% if list.present? %>
<%= list %>
<% end %>
"><%= yearly %>
<%= t("pages.plans.launch_price") %> <% if equiv.present? %>

<%= t("pages.plans.price_equiv", price: equiv) %>

<% end %>

<%= raw t("pages.plans.price_alt_html", price: monthly) %>

<% end %> <% if plan.slug == "premium_full" %>

<%= t("pages.plans.staff_note_full") %>

<% 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 %>
<% %w[yearly monthly].each do |interval| %> <%= link_to t( "billing.messages.activate_button", plan: plan_cta_name(plan), 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 %>
<% end %>