module Public
  class PagesController < WebBaseController
    def home
    end

    def features
    end

    def pricing
      @plans = Plan.ordered
      load_club_billing_context_for_pricing
    end

    private

    def load_club_billing_context_for_pricing
      return unless logged_in?

      @club = current_user.primary_club
      return unless @club

      @subscription = @club.subscription
      @team = @club.teams.order(:name).first
      @entitlements = @team&.entitlements
    end

    def privacy
    end

    def terms
    end

    def faq
    end

    def pallavolo
    end
  end
end
