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

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

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

    ngOnInit(): void {
    }

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

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

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

}
