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

namespace Scripts
{
	public class CanShrinkHTicker : IScript
	{
		public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
		{
			// Only allow HTicker shrinking if:
			// 1. HTicker is currently visible
			// 2. AND HTicker is currently extended
			var condition1 = item.Theme.ConditionFlags.CheckState("C_HTicker");
			var condition2 = item.Theme.ConditionFlags.CheckState("C_HTickerLarge");
			
			return condition1 && condition2;
		}
	}
}