using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Net;
using System.Runtime.CompilerServices;
using System.Windows;

namespace GridViewDataTableFilter
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
    }

    public enum MyEnum
    {
        FirstValue,
        SecondValue,
        ThirdValue,
        FourthValue
    }


    public class MyViewModel
    {
        public MyViewModel()
        {
            MyDictionaries = new ObservableCollection<RowViewModel>();

            for(var i = 0; i < 10; i++)
            {
                
                var firstList = new MyDemoList() { Title = $"First Value: {i}" };
                firstList.Add(new MyClass { Value = 1 });

                var secondList = new MyDemoList() { Title = $"Second Value: {i}" };
                secondList.Add(new MyClass { Value = 1 });
                secondList.Add(new MyClass { Value = 2 });

                var thirdList = new MyDemoList() { Title = $"Third Value: {i}" };
                thirdList.Add(new MyClass { Value = 1 });
                thirdList.Add(new MyClass { Value = 2 });
                thirdList.Add(new MyClass { Value = 3 });

                var dictionary = new Dictionary<MyEnum, MyDemoList>();

                dictionary[MyEnum.FirstValue] = firstList;
                dictionary[MyEnum.SecondValue] = secondList;
                dictionary[MyEnum.ThirdValue] = thirdList;

                if(i % 2 == 0)
                {
                    dictionary[MyEnum.FourthValue] = new MyDemoList { Title = "Empty List" };
                }

                MyDictionaries.Add(new RowViewModel
                {
                    Dictionary = dictionary
                });
            }
        }

        public ObservableCollection<RowViewModel> MyDictionaries { get; }
    }
}
