using System.Text;

namespace QCRPG.TSL.BT.Packets;

public static class QhsFPhyPreferenceInfo
{
	public static QhsFPhyPreferenceEnum ValueToQhsFPhyPreference(uint value)
	{
		return value switch
		{
			0u => QhsFPhyPreferenceEnum.The_Host_prefers_not_to_use_the_QHS_F_PHY, 
			1u => QhsFPhyPreferenceEnum.The_Host_prefers_to_use_the_QHS_F_PHY_possibly_among_others, 
			_ => QhsFPhyPreferenceEnum.InvalidQhsFPhyPreferenceValue, 
		};
	}

	public static uint QhsFPhyPreferenceToValue(QhsFPhyPreferenceEnum enumItem)
	{
		return enumItem switch
		{
			QhsFPhyPreferenceEnum.The_Host_prefers_not_to_use_the_QHS_F_PHY => 0u, 
			QhsFPhyPreferenceEnum.The_Host_prefers_to_use_the_QHS_F_PHY_possibly_among_others => 1u, 
			_ => uint.MaxValue, 
		};
	}

	public static string QhsFPhyPreferenceToString(QhsFPhyPreferenceEnum enumItem)
	{
		return enumItem switch
		{
			QhsFPhyPreferenceEnum.The_Host_prefers_not_to_use_the_QHS_F_PHY => "The Host prefers not to use the QHS-F PHY", 
			QhsFPhyPreferenceEnum.The_Host_prefers_to_use_the_QHS_F_PHY_possibly_among_others => "The Host prefers to use the QHS-F PHY (possibly among others)", 
			_ => "Invalid QhsFPhyPreference Value", 
		};
	}

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