using MudBlazor;

namespace TechHelper.Client.Helper
{
	public static class Helper
	{
		public static Color GetColorFromInt(int value)
		{
			var v = value % Enum.GetValues(typeof(Color)).Length;
			switch (value)
			{
				case 1:
					return MudBlazor.Color.Primary;
				case 2:
					return MudBlazor.Color.Secondary;
				case 3:
					return MudBlazor.Color.Success;
				case 4:
					return MudBlazor.Color.Info;
				case 5:
					return MudBlazor.Color.Warning;
				case 6:
					return MudBlazor.Color.Error;
				case 7:
					return MudBlazor.Color.Dark;
				default:
					return MudBlazor.Color.Default;
			}
		}
	}
}
