import { Component, OnInit, ChangeDetectionStrategy, Input, OnChanges, SimpleChanges } from '@angular/core';
import { Router } from '@angular/router';
import { BaseList } from 'src/app/core/base/base-list';

@Component({
  selector: 'app-list',
  templateUrl: './list.component.html',
  styleUrls: ['./list.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class ListComponent extends BaseList implements OnInit,OnChanges {
  @Input() testingInfomationList : any = [];
  constructor(
    private router: Router
  ) {
    super()
   }

  ngOnInit(): void {
  }

  ngOnChanges(changes: SimpleChanges): void {
    this.testingInfomationList = this.updateMatTable(this.testingInfomationList? this.testingInfomationList:[])
  }

  onView(uid){
    this.router.navigate(['change-exam-room/view',uid])
  }
}
