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

namespace ytLive.Helpers;

/// <summary>True when the bound value's ToString() equals the ConverterParameter string.</summary>
public class EnumToBoolConverter : IValueConverter
{
    public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
        => value?.ToString() == parameter?.ToString();

    public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
        => Binding.DoNothing;
}
