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

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

  ngOnInit(): void {
  }

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

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

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

}
