using System.Globalization;
using System.Windows.Data;

namespace DashBoard.View;

/// <summary>
/// Interaction logic for DashBoardMain.xaml
/// </summary>
public partial class DashBoardMain : UserControl
{
    public DashBoardMain()
    {
        InitializeComponent();
    }
}

internal class DeviceContert : IMultiValueConverter
{
    public object? Convert(object[] value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value[0] is not IDictionary<Guid, DeviceInfo_VM> source)
            return default;


        if (value[1] is not Guid deviceID)
            return default;

        source.TryGetValue(deviceID, out DeviceInfo_VM? device);
        return device;
    }

    public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
