using System.Text;

namespace QCRPG.TSL.FMHCI.Packets;

public static class InjectionSideInfo
{
	public static InjectionSideEnum ValueToInjectionSide(uint value)
	{
		return value switch
		{
			0u => InjectionSideEnum.CENTER, 
			1u => InjectionSideEnum.LO_SIDE, 
			2u => InjectionSideEnum.HI_SIDE, 
			_ => InjectionSideEnum.InvalidInjectionSideValue, 
		};
	}

	public static uint InjectionSideToValue(InjectionSideEnum enumItem)
	{
		return enumItem switch
		{
			InjectionSideEnum.CENTER => 0u, 
			InjectionSideEnum.LO_SIDE => 1u, 
			InjectionSideEnum.HI_SIDE => 2u, 
			_ => uint.MaxValue, 
		};
	}

	public static string InjectionSideToString(InjectionSideEnum enumItem)
	{
		return enumItem switch
		{
			InjectionSideEnum.CENTER => "CENTER", 
			InjectionSideEnum.LO_SIDE => "LO_SIDE", 
			InjectionSideEnum.HI_SIDE => "HI_SIDE", 
			_ => "Invalid InjectionSide Value", 
		};
	}

	public static string InjectionSideToDescription()
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.AppendLine("0x0 = CENTER");
		stringBuilder.AppendLine("0x1 = LO_SIDE");
		stringBuilder.AppendLine("0x2 = HI_SIDE");
		return stringBuilder.ToString();
	}
}
