using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using System.Windows.Media;

namespace Scripts
{
	public class OverrideClassColor : IScript
	{
		private Color _singleClassFontColor = Colors.White;
		private Color _singleClassBgColor = Color.FromRgb(0,122,204);
	
		public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
		{
			if (sim.Session.ClassManager.Classes.Count < 2)
			{
				if (parameter == "font")
					return _singleClassFontColor;
				return _singleClassBgColor;
			}
			return value;
		}
	}
}