using System.Text;

namespace QCRPG.TSL.BT.Packets;

public static class SupportBitInfo
{
	public static SupportBitEnum ValueToSupportBit(uint value)
	{
		return value switch
		{
			0u => SupportBitEnum.Not_Supported, 
			1u => SupportBitEnum.Supported, 
			_ => SupportBitEnum.InvalidSupportBitValue, 
		};
	}

	public static uint SupportBitToValue(SupportBitEnum enumItem)
	{
		return enumItem switch
		{
			SupportBitEnum.Not_Supported => 0u, 
			SupportBitEnum.Supported => 1u, 
			_ => uint.MaxValue, 
		};
	}

	public static string SupportBitToString(SupportBitEnum enumItem)
	{
		return enumItem switch
		{
			SupportBitEnum.Not_Supported => "Not Supported", 
			SupportBitEnum.Supported => "Supported", 
			_ => "Invalid SupportBit Value", 
		};
	}

	public static string SupportBitToDescription()
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.AppendLine("0x0 = Not Supported");
		stringBuilder.AppendLine("0x1 = Supported");
		return stringBuilder.ToString();
	}
}
