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

@Component({
    selector: 'app-typesubject-list',
    templateUrl: './typesubject-list.component.html',
    styleUrls: ['./typesubject-list.component.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class TypesubjectListComponent extends BaseList implements OnInit , OnChanges {
    @Input() subjecttypeList: any = [];
    @Output() edit = new EventEmitter();
    @Output() delete = new EventEmitter();

    column = ['1', '2', '3', '4', '5', '6'];


    constructor() {
        super();
    }

    ngOnInit(): void {
    }

    ngOnChanges(){
        this.subjecttypeList = this.updateMatTable(this.subjecttypeList);
    }

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

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

}
