using System.Text;

namespace QCRPG.TSL.NFC.Packets;

public static class AssertBitInfo
{
	public static AssertBitEnum ValueToAssertBit(uint value)
	{
		return value switch
		{
			0u => AssertBitEnum.Not_Set, 
			1u => AssertBitEnum.Set, 
			_ => AssertBitEnum.InvalidAssertBitValue, 
		};
	}

	public static uint AssertBitToValue(AssertBitEnum enumItem)
	{
		return enumItem switch
		{
			AssertBitEnum.Not_Set => 0u, 
			AssertBitEnum.Set => 1u, 
			_ => uint.MaxValue, 
		};
	}

	public static string AssertBitToString(AssertBitEnum enumItem)
	{
		return enumItem switch
		{
			AssertBitEnum.Not_Set => "Not Set", 
			AssertBitEnum.Set => "Set", 
			_ => "Invalid AssertBit Value", 
		};
	}

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