using System.Text;

namespace QCRPG.TSL.BT.Packets;

public static class QhsPPhyPreferenceInfo
{
	public static QhsPPhyPreferenceEnum ValueToQhsPPhyPreference(uint value)
	{
		return value switch
		{
			0u => QhsPPhyPreferenceEnum.The_Host_prefers_not_to_use_the_QHS_P_PHY, 
			1u => QhsPPhyPreferenceEnum.The_Host_prefers_to_use_the_QHS_P_PHY_possibly_among_others, 
			_ => QhsPPhyPreferenceEnum.InvalidQhsPPhyPreferenceValue, 
		};
	}

	public static uint QhsPPhyPreferenceToValue(QhsPPhyPreferenceEnum enumItem)
	{
		return enumItem switch
		{
			QhsPPhyPreferenceEnum.The_Host_prefers_not_to_use_the_QHS_P_PHY => 0u, 
			QhsPPhyPreferenceEnum.The_Host_prefers_to_use_the_QHS_P_PHY_possibly_among_others => 1u, 
			_ => uint.MaxValue, 
		};
	}

	public static string QhsPPhyPreferenceToString(QhsPPhyPreferenceEnum enumItem)
	{
		return enumItem switch
		{
			QhsPPhyPreferenceEnum.The_Host_prefers_not_to_use_the_QHS_P_PHY => "The Host prefers not to use the QHS-P PHY", 
			QhsPPhyPreferenceEnum.The_Host_prefers_to_use_the_QHS_P_PHY_possibly_among_others => "The Host prefers to use the QHS-P PHY (possibly among others)", 
			_ => "Invalid QhsPPhyPreference Value", 
		};
	}

	public static string QhsPPhyPreferenceToDescription()
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.AppendLine("0x0 = The Host prefers not to use the QHS-P PHY");
		stringBuilder.AppendLine("0x1 = The Host prefers to use the QHS-P PHY (possibly among others)");
		return stringBuilder.ToString();
	}
}
