namespace HistoryView.Converters;

public class WorkoutToText : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value is not float power)
            return "Unknow";


        return power switch
        {
            0 => "No Limit",
            _ => $"{power:0.0} %"
        };
    }

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