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

@Component({
  selector: 'academic-semesters-list',
  templateUrl: './academic-semesters-list.component.html',
  styleUrls: ['./academic-semesters-list.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class AcademicSemestersListComponent extends BaseList implements OnInit,OnChanges {
  column = ['1', '2', '3', '4', '5', '6'];

  @Input() academicSemestersList: any = [];
  @Output() edit = new EventEmitter()
  @Output() delete = new EventEmitter()
  constructor() {
    super()
   }

  ngOnInit(): void {
  }

  ngOnChanges(){
    this.academicSemestersList = this.updateMatTable(this.academicSemestersList? this.academicSemestersList:[])
  }

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

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

}
