using CoreLibrary.Core;
using System.Globalization;

namespace MauiSpark.Convertisseurs
{
    public class IndicateurVersCouleurMAUI : IValueConverter
    {
        public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
        {
            if (value is not Indicateur) return "black";

            switch (value)
            {
                case Indicateur.BONNEPLACE:
                    return "black";
                case Indicateur.BONNECOULEUR:
                    return "white";
                default:
                    return "black";
            }
        }

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

}
