using System;
using InABox.Core;
using Xamarin.Forms;

namespace InABox.Mobile
{
    public class GuidToImageSourceConverter : AbstractConverter<Guid, ImageSource>
    {
        public ImageSource HasValue { get; set; }
        public ImageSource NoValue { get; set; }
        
        protected override ImageSource Convert(Guid value, object? parameter = null)
        {
            return value == Guid.Empty || value == CoreUtils.FullGuid
                ? NoValue
                : HasValue;
        }
    }
}