using CommunityToolkit.Mvvm.ComponentModel;
using GenericWpfApp.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace GenericWpfApp.ViewModel
{
   public class ImpedanceCheckWindowViewModel : ObservableObject
   {
      public enum Images
      {
         PASS_CHECK,
         FAIL_CHECK
      }

      public Dictionary<Images, string> _imageToResourcePathDict = new Dictionary<Images, string>()
      {
         {Images.PASS_CHECK, @"/Resources/Images/green-check-mark.png" },
         {Images.FAIL_CHECK, @"/Resources/Images/red-cross-mark.png" }
      };

      #region Data Bindings
      public ObservableCollection<ImpedanceDataModel> _listviewImpedanceDatatems { get; set; }

      #endregion Data Bindings

      public ImpedanceCheckWindowViewModel()
      {
         _listviewImpedanceDatatems = new ObservableCollection<ImpedanceDataModel>();
      }

      public void AddData(ImpedanceDataModel item)
      {
         App.Current.Dispatcher.Invoke((Action)delegate
         {
            _listviewImpedanceDatatems.Add(item);
         });
      }
   }
}
