using System.Text;

namespace QCRPG.TSL.BT.Packets;

public static class Ar3002PacketTypeInfo
{
	public static Ar3002PacketTypeEnum ValueToAr3002PacketType(uint value)
	{
		return value switch
		{
			0u => Ar3002PacketTypeEnum.ALL_TYPES, 
			1u => Ar3002PacketTypeEnum.ALL_TYPES_EXCEPT_DM1_DM3_DM5, 
			2u => Ar3002PacketTypeEnum.DM1, 
			3u => Ar3002PacketTypeEnum.DM3, 
			4u => Ar3002PacketTypeEnum.DM5, 
			5u => Ar3002PacketTypeEnum.DH1, 
			6u => Ar3002PacketTypeEnum.DH3, 
			7u => Ar3002PacketTypeEnum.DH5, 
			8u => Ar3002PacketTypeEnum.TWO_DH1, 
			9u => Ar3002PacketTypeEnum.TWO_DH3, 
			10u => Ar3002PacketTypeEnum.TWO_DH5, 
			11u => Ar3002PacketTypeEnum.THREE_DH1, 
			12u => Ar3002PacketTypeEnum.THREE_DH3, 
			13u => Ar3002PacketTypeEnum.THREE_DH5, 
			_ => Ar3002PacketTypeEnum.InvalidAr3002PacketTypeValue, 
		};
	}

	public static uint Ar3002PacketTypeToValue(Ar3002PacketTypeEnum enumItem)
	{
		return enumItem switch
		{
			Ar3002PacketTypeEnum.ALL_TYPES => 0u, 
			Ar3002PacketTypeEnum.ALL_TYPES_EXCEPT_DM1_DM3_DM5 => 1u, 
			Ar3002PacketTypeEnum.DM1 => 2u, 
			Ar3002PacketTypeEnum.DM3 => 3u, 
			Ar3002PacketTypeEnum.DM5 => 4u, 
			Ar3002PacketTypeEnum.DH1 => 5u, 
			Ar3002PacketTypeEnum.DH3 => 6u, 
			Ar3002PacketTypeEnum.DH5 => 7u, 
			Ar3002PacketTypeEnum.TWO_DH1 => 8u, 
			Ar3002PacketTypeEnum.TWO_DH3 => 9u, 
			Ar3002PacketTypeEnum.TWO_DH5 => 10u, 
			Ar3002PacketTypeEnum.THREE_DH1 => 11u, 
			Ar3002PacketTypeEnum.THREE_DH3 => 12u, 
			Ar3002PacketTypeEnum.THREE_DH5 => 13u, 
			_ => uint.MaxValue, 
		};
	}

	public static string Ar3002PacketTypeToString(Ar3002PacketTypeEnum enumItem)
	{
		return enumItem switch
		{
			Ar3002PacketTypeEnum.ALL_TYPES => "ALL_TYPES", 
			Ar3002PacketTypeEnum.ALL_TYPES_EXCEPT_DM1_DM3_DM5 => "ALL_TYPES_EXCEPT_DM1_DM3_DM5", 
			Ar3002PacketTypeEnum.DM1 => "DM1", 
			Ar3002PacketTypeEnum.DM3 => "DM3", 
			Ar3002PacketTypeEnum.DM5 => "DM5", 
			Ar3002PacketTypeEnum.DH1 => "DH1", 
			Ar3002PacketTypeEnum.DH3 => "DH3", 
			Ar3002PacketTypeEnum.DH5 => "DH5", 
			Ar3002PacketTypeEnum.TWO_DH1 => "TWO_DH1", 
			Ar3002PacketTypeEnum.TWO_DH3 => "TWO_DH3", 
			Ar3002PacketTypeEnum.TWO_DH5 => "TWO_DH5", 
			Ar3002PacketTypeEnum.THREE_DH1 => "THREE_DH1", 
			Ar3002PacketTypeEnum.THREE_DH3 => "THREE_DH3", 
			Ar3002PacketTypeEnum.THREE_DH5 => "THREE_DH5", 
			_ => "Invalid Ar3002PacketType Value", 
		};
	}

	public static string Ar3002PacketTypeToDescription()
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.AppendLine("0x0 = ALL_TYPES");
		stringBuilder.AppendLine("0x1 = ALL_TYPES_EXCEPT_DM1_DM3_DM5");
		stringBuilder.AppendLine("0x2 = DM1");
		stringBuilder.AppendLine("0x3 = DM3");
		stringBuilder.AppendLine("0x4 = DM5");
		stringBuilder.AppendLine("0x5 = DH1");
		stringBuilder.AppendLine("0x6 = DH3");
		stringBuilder.AppendLine("0x7 = DH5");
		stringBuilder.AppendLine("0x8 = TWO_DH1");
		stringBuilder.AppendLine("0x9 = TWO_DH3");
		stringBuilder.AppendLine("0xA = TWO_DH5");
		stringBuilder.AppendLine("0xB = THREE_DH1");
		stringBuilder.AppendLine("0xC = THREE_DH3");
		stringBuilder.AppendLine("0xD = THREE_DH5");
		return stringBuilder.ToString();
	}
}
