class Admin::InvitationsController < Admin::BaseController
  def index
    @current_section = :invitations
    @pagy, @invitations_used = pagy(Invitation.used.order('used_at desc'))

    @stats = {
      available: Invitation.unused.count,
      accepted: @invitations_used.length,
      users_with_referrals: Invitation.used.distinct.count(:user_id)
    }
  end
end
