using System;
using Avalonia.Media;

namespace InABox.Avalonia.Converters
{
    public class StringToColorConverter : AbstractConverter<string,IBrush>
    {
        
        public IBrush Empty{ get; set; }
        
        public IBrush Color { get; set; }
        
        protected override IBrush Convert(string value, object parameter = null)
        {
            return !string.IsNullOrWhiteSpace(value)
                ? Color
                : Empty;
        }

    }
}