using CommunityToolkit.Mvvm.ComponentModel;

namespace InABox.Avalonia.Converters;

public partial class StringWithDefaultConverter : AbstractConverter<string?,string?>
{
    [ObservableProperty] 
    private string? _default = "";

    protected override string? Convert(string? value, object? parameter = null)
    {
        return String.IsNullOrWhiteSpace(value)
            ? _default
            : value;
    }
    
}