using System.Collections;

namespace InABox.Avalonia.Converters;

public class ListToBooleanConverter : AbstractConverter<IList, bool>
{
    
    public bool EmptyValue { get; set; }
    
    protected override bool Convert(IList? value, object? parameter = null)
    {
        return value?.Count == 0
            ? EmptyValue
            : !EmptyValue;
    }
}