namespace InABox.WPF;

public class BooleanConverter<T> : AbstractConverter<bool, T?>
{
    public T? TrueValue { get; set; }
    public T? FalseValue { get; set; }
    
    public override T? Convert(bool value)
    {
        return value
            ? TrueValue
            : FalseValue;
    }

    public override bool Deconvert(T? value)
    {
        return Equals(value,TrueValue);
    }
}