using System.Text;

namespace QCRPG.TSL.BT.Packets;

public static class EnableBitInfo
{
	public static EnableBitEnum ValueToEnableBit(uint value)
	{
		return value switch
		{
			0u => EnableBitEnum.Disabled, 
			1u => EnableBitEnum.Enabled, 
			_ => EnableBitEnum.InvalidEnableBitValue, 
		};
	}

	public static uint EnableBitToValue(EnableBitEnum enumItem)
	{
		return enumItem switch
		{
			EnableBitEnum.Disabled => 0u, 
			EnableBitEnum.Enabled => 1u, 
			_ => uint.MaxValue, 
		};
	}

	public static string EnableBitToString(EnableBitEnum enumItem)
	{
		return enumItem switch
		{
			EnableBitEnum.Disabled => "Disabled", 
			EnableBitEnum.Enabled => "Enabled", 
			_ => "Invalid EnableBit Value", 
		};
	}

	public static string EnableBitToDescription()
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.AppendLine("0x0 = Disabled");
		stringBuilder.AppendLine("0x1 = Enabled");
		return stringBuilder.ToString();
	}
}
