using Xamarin.Forms;

namespace InABox.Mobile
{
    public class BooleanToImageConverter : AbstractConverter<bool,ImageSource>
    {
        public ImageSource Checked { get; set; }
        public ImageSource Unchecked { get; set; }

        protected override ImageSource Convert(bool value, object? parameter = null)
        {
            return value
                ? Checked
                : Unchecked;
        }

        protected override bool Deconvert(ImageSource value, object? parameter = null)
        {
            return value == Checked;
        }
        
    }
}