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

@Component({
  selector: 'faculties-list',
  templateUrl: './faculties-list.component.html',
  styleUrls: ['./faculties-list.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class FacultiesListComponent extends BaseList implements OnInit,OnChanges {
  @Input() facultiesList: any = [];
  @Output() edit = new EventEmitter()
  @Output() delete = new EventEmitter()
  column = ['1', '2', '3', '4', '5', '6'];
  constructor() {
    super()
   }

  ngOnInit(): void {
  }

  ngOnChanges(){
    this.facultiesList = this.updateMatTable(this.facultiesList)
  }

  onEdit(id){
    this.edit.emit(id)
  }

  onDelete(id){
    this.delete.emit(id)
  }

}
