import type { User } from 'types/User'

function getUserStatus (user: User) {
  if (!user) return null
  if (user.is_blocked) return { status: 'blocked', text: 'user_status__user_blocked', color:  'negative' }
  if (user.is_leave) return { status: 'leave', text: 'user_status__user_leave', color: 'primary' }
  if (!user.is_terms_accepted) return { status: 'pending', text: 'user_status__user_pending', color: 'secondary' }
}

export {
  getUserStatus
}