import { Component, OnInit, Input } from '@angular/core';
import { ChatStatus } from 'app/chat/models/chat-status.enum';

@Component({
  selector: 'app-chat-status',
  templateUrl: './chat-status.component.html',
  styleUrls: ['./chat-status.component.scss']
})
export class ChatStatusComponent implements OnInit {

  @Input()
  status: ChatStatus = ChatStatus.NOT_AVAILABLE;

  get statusText() {
    let text = '';
    switch (this.status) {
      case ChatStatus.NOT_AVAILABLE:
        text = 'Not available';
        break;
      case ChatStatus.ACTIVE:
        text = 'Active now';
        break;
    }
    return text;
  }

  constructor() { }

  ngOnInit() {
  }

}
