using System.Text;

namespace QCRPG.TSL.BT.Packets;

public class ClockOffsetEnumCollection
{
	public enum ClockOffsetValidFlagEnum
	{
		Invalid_Clock_Offset,
		Valid_Clock_Offset,
		InvalidClockOffsetValidFlagValue
	}

	public static class ClockOffsetValidFlagInfo
	{
		public static ClockOffsetValidFlagEnum ValueToClockOffsetValidFlag(uint value)
		{
			return value switch
			{
				0u => ClockOffsetValidFlagEnum.Invalid_Clock_Offset, 
				1u => ClockOffsetValidFlagEnum.Valid_Clock_Offset, 
				_ => ClockOffsetValidFlagEnum.InvalidClockOffsetValidFlagValue, 
			};
		}

		public static uint ClockOffsetValidFlagToValue(ClockOffsetValidFlagEnum enumItem)
		{
			return enumItem switch
			{
				ClockOffsetValidFlagEnum.Invalid_Clock_Offset => 0u, 
				ClockOffsetValidFlagEnum.Valid_Clock_Offset => 1u, 
				_ => uint.MaxValue, 
			};
		}

		public static string ClockOffsetValidFlagToString(ClockOffsetValidFlagEnum enumItem)
		{
			return enumItem switch
			{
				ClockOffsetValidFlagEnum.Invalid_Clock_Offset => "Invalid Clock Offset", 
				ClockOffsetValidFlagEnum.Valid_Clock_Offset => "Valid Clock Offset", 
				_ => "Invalid ClockOffsetValidFlag Value", 
			};
		}

		public static string ClockOffsetValidFlagToDescription()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendLine("0x0 = Invalid Clock Offset");
			stringBuilder.AppendLine("0x1 = Valid Clock Offset");
			return stringBuilder.ToString();
		}
	}

	private uint _Bits162OfClknslaveClk;

	private ClockOffsetValidFlagEnum _ClockOffsetValidFlag;

	public uint Bits162OfClknslaveClk
	{
		get
		{
			return _Bits162OfClknslaveClk;
		}
		set
		{
			_Bits162OfClknslaveClk = value;
		}
	}

	public ClockOffsetValidFlagEnum ClockOffsetValidFlag
	{
		get
		{
			return _ClockOffsetValidFlag;
		}
		set
		{
			_ClockOffsetValidFlag = value;
		}
	}
}
