using CommunityToolkit.Mvvm.ComponentModel;

namespace InABox.Avalonia.Converters;

public partial class GuidToBooleanConverter : AbstractConverter<Guid,bool>
{
    [ObservableProperty] 
    private bool _inverted = false;

    protected override bool Convert(Guid value, object? parameter = null)
    {
        var empty = Guid.Equals(value, Guid.Empty);
        return Inverted 
            ? empty 
            : !empty;
    }
    
}