namespace HistoryView.Converters;

public class AutoTuneStatusToBool : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value is not AutoTuneStatus autoTune)
            return true;


        return autoTune switch
        {
            AutoTuneStatus.Unavailable => false,
            AutoTuneStatus.Triggered => false,
            AutoTuneStatus.Tuning => false,

            AutoTuneStatus.Ready => true,
            AutoTuneStatus.Aborted => true,
            AutoTuneStatus.Timeout => true,
            AutoTuneStatus.Overflow => true,
            AutoTuneStatus.Complete => true,
            _ => true
        };

    }

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