import { Component, Inject, OnInit } from '@angular/core';
import { HistorialCodigos } from '../../../interfaces/equipment-management.interface';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';

@Component({
    selector: 'app-codes-history',
    templateUrl: './codes-history.component.html',
    styleUrl: './codes-history.component.css',
    standalone: false
})
export class CodesHistoryComponent implements OnInit {
  equipment: string;
  codesList: HistorialCodigos[];

  constructor(
    @Inject(MAT_DIALOG_DATA) private _data: any
  ) {
    this.equipment = "";
    this.codesList = [];
  }

  ngOnInit(): void {
    this.equipment = this._data.equipment;
    this.codesList = this._data.history;
  }
}
