using System;
using System.Globalization;
using Xamarin.Forms;

namespace SebastianTabViewRepro.Portable.Converters
{
    public class BoolToColorConverter : IValueConverter
    {
        public Color SelectedColor { get; set; } = Color.Red;
        public Color UnselectedColor { get; set; } = Color.Black;

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (bool)value ? SelectedColor : UnselectedColor;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
