function chatAccess (i: 0 | 1 | 2 ) {
  switch (i) {
    case 0: return typeDescription('no_access')
    case 1: return typeDescription('notify')
    case 2: return typeDescription('full')
  }
}

function chatState (i: 1 | 2 | 3 | 4) {
  switch (i) {
    case 1: return typeDescription('new')
    case 2: return typeDescription('reconnect')
    case 3: return typeDescription('detach')
    case 4: return typeDescription('delete')
  }
}

type ChatType =  'no_access' | 'notify' | 'full' | 'new' | 'reconnect' | 'detach' | 'delete' 

function typeDescription (type: ChatType) {
    switch (type) {
      case 'no_access': return {
        info: 'no_access',
        icon: 'mdi-close',
        color: 'negative',
        label: 'chat_type__label_no_access',
        description: 'chat_type__description_no_access'
      }
      
      case 'notify': return {
        info: type,
        icon: 'mdi-bell-outline',
        color: 'info',
        label: 'chat_type__label_notify',
        description: 'chat_type__description_notify'
      }

      case 'full': return {
        info: type,
        icon: 'mdi-crown-outline',
        color: 'primary',
        label: 'chat_type__label_full',
        description: 'chat_type__description_full'
      }

      case 'new': return {
        info: type,
        icon: '',
        color: 'primary',
        label: 'chat_type__label_new',
        description: 'chat_type__description_new'
      }

      case 'reconnect': return {
        info: type,
        icon: 'mdi-repeat-variant',
        color: 'negative',
        label: 'chat_type__label_reconnect',
        description: 'chat_type__description_reconnect'
      }

      case 'detach': return {
        info: type,
        icon: 'mdi-link-off',
        color: 'negative',
        label: 'chat_type__label_detach',
        description: 'chat_type__description_detach'
      }

      case 'delete': return {
        info: type,
        icon: 'mdi-chat-remove-outline',
        color: 'negative',
        label: 'chat_type__label_delete',
        description: 'chat_type__description_delete'
      }
    }
  }

export {
  chatAccess,
  chatState,
  typeDescription
}
