<commit_before>﻿using Avalonia.Data.Converters;
using Avalonia.Media;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using WalletWasabi.Models.ChaumianCoinJoin;

namespace WalletWasabi.Gui.Converters
{
	public class PhaseColorConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			if(!Enum.TryParse(typeof(CcjRoundPhase), parameter.ToString(), false, out var p))
				throw new ArgumentException($"Unknown '{parameter}' value");
			var phaseError = Global.ChaumianClient.State.IsInErrorState;

			return ((CcjRoundPhase)p <= (CcjRoundPhase)value) 
				? (phaseError? Brushes.Red : Brushes.Green)
				: Brushes.Gray;
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new InvalidOperationException();
		}
	}
}<commit_msg>change the red color to indianred according to design reqs<commit_after>﻿using Avalonia.Data.Converters;
using Avalonia.Media;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using WalletWasabi.Models.ChaumianCoinJoin;

namespace WalletWasabi.Gui.Converters
{
	public class PhaseColorConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			if(!Enum.TryParse(typeof(CcjRoundPhase), parameter.ToString(), false, out var p))
				throw new ArgumentException($"Unknown '{parameter}' value");
			var phaseError = Global.ChaumianClient.State.IsInErrorState;

			return ((CcjRoundPhase)p <= (CcjRoundPhase)value) 
				? (phaseError? Brushes.IndianRed : Brushes.Green)
				: Brushes.Gray;
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new InvalidOperationException();
		}
	}
}
{'fraction_non_alphanumeric': 0.09737827715355805, 'fraction_numerical': 0.0, 'mean_word_length': 5.493055555555555, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6520', 'n_tokens_mistral': 615, 'n_tokens_neox': 550, 'n_words': 137}