import { Component, OnInit, Input, SimpleChanges, OnChanges } from '@angular/core';

@Component({
  selector: 'sts-vehicle-data-list',
  templateUrl: './vehicle-data-list.component.html',
  styleUrls: ['./vehicle-data-list.component.scss']
})
export class VehicleDataListComponent implements OnInit, OnChanges {
  @Input() vehicleDataList;
  @Input() vehicleDataListLabels;

  obj = {
    heading: 'Vehicle Data',
    image: '../../../assets/images/Vehicle_Data@2x.png',
    data: []
  };

  constructor() { }

  ngOnInit() { }

  ngOnChanges(changes: SimpleChanges) {
    if (changes['VehicleData']) {
      this.vehicleDataList = changes['vehicleDataList'].currentValue;
    }
    if (changes['vehicleDataListLabels']) {
      this.vehicleDataListLabels = changes['vehicleDataListLabels'].currentValue;
    }
  }

}
