<%= content_for :page_title, t(".page_title") %> <%= settings_section title: t(".subscription_title"), subtitle: t(".subscription_subtitle") do %>
<%= render DS::FilledIcon.new( icon: "gem", rounded: true, size: "lg" ) %>
<% if @family.has_active_subscription? %>

You are currently subscribed to the <%= @family.subscription.name %>. <% if @family.next_billing_date %> Your plan renews on <%= @family.next_billing_date.strftime("%B %d, %Y") %>. <% end %>

<% elsif @family.trialing? %>

You are currently trialing <%= product_name %> (<%= @family.days_left_in_trial %> days remaining)

<% else %>

You are currently not subscribed

Once you subscribe to <%= product_name %>, you'll see your billing settings here.

<% end %>
<% if @family.has_active_subscription? %> <%= render DS::Link.new( text: "Manage", icon: "external-link", variant: "primary", icon_position: "right", href: subscription_path, rel: "noopener" ) %> <% else %> <%= render DS::Link.new( text: "Choose plan", variant: "primary", icon: "plus", icon_position: "right", href: upgrade_subscription_path(view: "upgrade"), rel: "noopener") %> <% end %>
<%= image_tag "stripe-logo.svg", class: "w-5 h-5 shrink-0" %>

Billing via Stripe

<% end %>