using Xamarin.Forms;

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

        protected override ImageSource Convert(bool value)
        {
            return value
                ? Checked
                : Unchecked;
        }

        protected override bool Deconvert(ImageSource value)
        {
            return value == Checked;
        }
        
    }
}