/* Copyright (C) Itseez3D, Inc. - All Rights Reserved
* You may not use this file except in compliance with an authorized license
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* UNLESS REQUIRED BY APPLICABLE LAW OR AGREED BY ITSEEZ3D, INC. IN WRITING, SOFTWARE DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED
* See the License for the specific language governing permissions and limitations under the License.
* Written by Itseez3D, Inc. <support@avatarsdk.com>, July 2026
*/

using System;

namespace AvatarSDKMove
{
	[Serializable]
	public class TextToAnimationParameters
	{
		public string text_prompt;
		public float duration;
		public string pipeline_subtype;
		public string format;
	}

	[Serializable]
	public class TextToAnimationData
	{
		public string url;
		public string code;
		public string status;
		public float progress;
		public string result_url;
		public string created_on;
		public TextToAnimationParameters parameters;
		public float duration;
		public string prompt;

		public string Prompt
		{
			get { return parameters != null && !string.IsNullOrEmpty(parameters.text_prompt) ? parameters.text_prompt : prompt; }
		}

		public float Duration
		{
			get { return parameters != null && parameters.duration > 0 ? parameters.duration : duration; }
		}

		public string Format
		{
			get { return parameters == null || string.IsNullOrEmpty(parameters.format) ? null : parameters.format; }
		}

		public bool IsCompleted { get { return status == "Completed"; } }

		public bool IsFailed { get { return status == "Failed" || status == "Timed Out"; } }

		public bool IsInProgress { get { return !IsCompleted && !IsFailed; } }
	}
}
