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

namespace Scripts
{
	public class ConvertSecondsToLaptime : IScript
	{
		public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
		{
			if (value is float)
			{
				return TimeHelpers.SecondsToLaptime((float)value);
			}
			else if (value is double)
			{
				return TimeHelpers.SecondsToLaptime((double)value);
			}
			return value;
		}
	}
}