using SWRIS.Enums;
using System;
using System.Globalization;
using System.Windows.Data;

namespace SWRIS.Converters
{
    public class DirectionStateToBooleanConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null) { return false; }

            if (value is DirectionState valueDirection)
            {
                return valueDirection != DirectionState.Stoped;
            }
            return false;
        }

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