import { Component } from '@angular/core';
import { Router } from '@angular/router';

import { MatTabChangeEvent } from '@angular/material/tabs';

@Component({
  selector: 'app-layouts-default',
  templateUrl: './default.layout.component.html',
  styleUrls: ['./default.layout.component.scss']
})
export class DefaultLayoutComponent {
  constructor(private router: Router) {}

  onSelectedTabChange(event: MatTabChangeEvent) {
    switch (event.index) {
      case 1:
        this.router.navigate(['/chat']);
        break;
      case 2:
        this.router.navigate(['/organization']);
        break;
      case 3:
        this.router.navigate(['/message']);
        break;
      default:
        this.router.navigate(['/group']);
        break;
    }
    console.log('onClickButton', event.index);
  }
}
