using System.Text;

namespace QCRPG.TSL.NFC.Packets;

public class NfcbDataExchangeConfigurationEnumCollection
{
	public enum MinimumTr2Enum
	{
		One_thousand_seven_hundred_and_ninety_two_carrier_periods,
		Three_thousand_three_hundred_and_twenty_eight_carrier_periods,
		Five_thousand_three_hundred_and_seventy_six_carrier_periods,
		Nine_thousand_four_hundred_and_seventy_two_carrier_periods,
		InvalidMinimumTr2Value
	}

	public static class MinimumTr2Info
	{
		public static MinimumTr2Enum ValueToMinimumTr2(uint value)
		{
			return value switch
			{
				0u => MinimumTr2Enum.One_thousand_seven_hundred_and_ninety_two_carrier_periods, 
				1u => MinimumTr2Enum.Three_thousand_three_hundred_and_twenty_eight_carrier_periods, 
				2u => MinimumTr2Enum.Five_thousand_three_hundred_and_seventy_six_carrier_periods, 
				3u => MinimumTr2Enum.Nine_thousand_four_hundred_and_seventy_two_carrier_periods, 
				_ => MinimumTr2Enum.InvalidMinimumTr2Value, 
			};
		}

		public static uint MinimumTr2ToValue(MinimumTr2Enum enumItem)
		{
			return enumItem switch
			{
				MinimumTr2Enum.One_thousand_seven_hundred_and_ninety_two_carrier_periods => 0u, 
				MinimumTr2Enum.Three_thousand_three_hundred_and_twenty_eight_carrier_periods => 1u, 
				MinimumTr2Enum.Five_thousand_three_hundred_and_seventy_six_carrier_periods => 2u, 
				MinimumTr2Enum.Nine_thousand_four_hundred_and_seventy_two_carrier_periods => 3u, 
				_ => uint.MaxValue, 
			};
		}

		public static string MinimumTr2ToString(MinimumTr2Enum enumItem)
		{
			return enumItem switch
			{
				MinimumTr2Enum.One_thousand_seven_hundred_and_ninety_two_carrier_periods => "1792/fc (10 etu + 32/fs)", 
				MinimumTr2Enum.Three_thousand_three_hundred_and_twenty_eight_carrier_periods => "3328/fc (10 etu + 128/fs)", 
				MinimumTr2Enum.Five_thousand_three_hundred_and_seventy_six_carrier_periods => "5376/fc (10 etu + 256/fs)", 
				MinimumTr2Enum.Nine_thousand_four_hundred_and_seventy_two_carrier_periods => "9472/fc (10 etu + 512/fs)", 
				_ => "Invalid MinimumTr2 Value", 
			};
		}

		public static string MinimumTr2ToDescription()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendLine("0x0 = 1792/fc (10 etu + 32/fs)");
			stringBuilder.AppendLine("0x1 = 3328/fc (10 etu + 128/fs)");
			stringBuilder.AppendLine("0x2 = 5376/fc (10 etu + 256/fs)");
			stringBuilder.AppendLine("0x3 = 9472/fc (10 etu + 512/fs)");
			return stringBuilder.ToString();
		}
	}

	public enum MinimumTr1Enum
	{
		Default_value,
		Sixty_four_times_sixteen_carrier_periods,
		Sixteen_times_sixteen_carrier_periods,
		RFU,
		InvalidMinimumTr1Value
	}

	public static class MinimumTr1Info
	{
		public static MinimumTr1Enum ValueToMinimumTr1(uint value)
		{
			return value switch
			{
				0u => MinimumTr1Enum.Default_value, 
				1u => MinimumTr1Enum.Sixty_four_times_sixteen_carrier_periods, 
				2u => MinimumTr1Enum.Sixteen_times_sixteen_carrier_periods, 
				3u => MinimumTr1Enum.RFU, 
				_ => MinimumTr1Enum.InvalidMinimumTr1Value, 
			};
		}

		public static uint MinimumTr1ToValue(MinimumTr1Enum enumItem)
		{
			return enumItem switch
			{
				MinimumTr1Enum.Default_value => 0u, 
				MinimumTr1Enum.Sixty_four_times_sixteen_carrier_periods => 1u, 
				MinimumTr1Enum.Sixteen_times_sixteen_carrier_periods => 2u, 
				MinimumTr1Enum.RFU => 3u, 
				_ => uint.MaxValue, 
			};
		}

		public static string MinimumTr1ToString(MinimumTr1Enum enumItem)
		{
			return enumItem switch
			{
				MinimumTr1Enum.Default_value => "Default value", 
				MinimumTr1Enum.Sixty_four_times_sixteen_carrier_periods => "64 x 16/fc", 
				MinimumTr1Enum.Sixteen_times_sixteen_carrier_periods => "16 x 16/fc", 
				MinimumTr1Enum.RFU => "RFU", 
				_ => "Invalid MinimumTr1 Value", 
			};
		}

		public static string MinimumTr1ToDescription()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendLine("0x0 = Default value");
			stringBuilder.AppendLine("0x1 = 64 x 16/fc");
			stringBuilder.AppendLine("0x2 = 16 x 16/fc");
			stringBuilder.AppendLine("0x3 = RFU");
			return stringBuilder.ToString();
		}
	}

	public enum MinimumTr0Enum
	{
		Default_value,
		Forty_eight_times_sixteen_carrier_periods,
		Sixteen_times_sixteen_carrier_periods,
		RFU,
		InvalidMinimumTr0Value
	}

	public static class MinimumTr0Info
	{
		public static MinimumTr0Enum ValueToMinimumTr0(uint value)
		{
			return value switch
			{
				0u => MinimumTr0Enum.Default_value, 
				1u => MinimumTr0Enum.Forty_eight_times_sixteen_carrier_periods, 
				2u => MinimumTr0Enum.Sixteen_times_sixteen_carrier_periods, 
				3u => MinimumTr0Enum.RFU, 
				_ => MinimumTr0Enum.InvalidMinimumTr0Value, 
			};
		}

		public static uint MinimumTr0ToValue(MinimumTr0Enum enumItem)
		{
			return enumItem switch
			{
				MinimumTr0Enum.Default_value => 0u, 
				MinimumTr0Enum.Forty_eight_times_sixteen_carrier_periods => 1u, 
				MinimumTr0Enum.Sixteen_times_sixteen_carrier_periods => 2u, 
				MinimumTr0Enum.RFU => 3u, 
				_ => uint.MaxValue, 
			};
		}

		public static string MinimumTr0ToString(MinimumTr0Enum enumItem)
		{
			return enumItem switch
			{
				MinimumTr0Enum.Default_value => "Default value", 
				MinimumTr0Enum.Forty_eight_times_sixteen_carrier_periods => "48 x 16/fc", 
				MinimumTr0Enum.Sixteen_times_sixteen_carrier_periods => "16 x 16/fc", 
				MinimumTr0Enum.RFU => "RFU", 
				_ => "Invalid MinimumTr0 Value", 
			};
		}

		public static string MinimumTr0ToDescription()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendLine("0x0 = Default value");
			stringBuilder.AppendLine("0x1 = 48 x 16/fc");
			stringBuilder.AppendLine("0x2 = 16 x 16/fc");
			stringBuilder.AppendLine("0x3 = RFU");
			return stringBuilder.ToString();
		}
	}

	private MinimumTr2Enum _MinimumTr2;

	private SuppressionBitEnum _SuppressionOfSos;

	private SuppressionBitEnum _SuppressionOfEos;

	private MinimumTr1Enum _MinimumTr1;

	private MinimumTr0Enum _MinimumTr0;

	public MinimumTr2Enum MinimumTr2
	{
		get
		{
			return _MinimumTr2;
		}
		set
		{
			_MinimumTr2 = value;
		}
	}

	public SuppressionBitEnum SuppressionOfSos
	{
		get
		{
			return _SuppressionOfSos;
		}
		set
		{
			_SuppressionOfSos = value;
		}
	}

	public SuppressionBitEnum SuppressionOfEos
	{
		get
		{
			return _SuppressionOfEos;
		}
		set
		{
			_SuppressionOfEos = value;
		}
	}

	public MinimumTr1Enum MinimumTr1
	{
		get
		{
			return _MinimumTr1;
		}
		set
		{
			_MinimumTr1 = value;
		}
	}

	public MinimumTr0Enum MinimumTr0
	{
		get
		{
			return _MinimumTr0;
		}
		set
		{
			_MinimumTr0 = value;
		}
	}
}
