using System.Text;

namespace QCRPG.TSL.BT.Packets;

public class PhyPreferenceUseEnumCollection
{
	public enum TransmitterPreferenceUseEnum
	{
		The_Host_prefers_the_Controller_to_use_the_transmitter_PHYs_specified_in_the_TX_PHYS_field,
		The_Host_has_no_preference_among_the_transmitter_PHYs_supported_by_the_Controller,
		InvalidTransmitterPreferenceUseValue
	}

	public static class TransmitterPreferenceUseInfo
	{
		public static TransmitterPreferenceUseEnum ValueToTransmitterPreferenceUse(uint value)
		{
			return value switch
			{
				0u => TransmitterPreferenceUseEnum.The_Host_prefers_the_Controller_to_use_the_transmitter_PHYs_specified_in_the_TX_PHYS_field, 
				1u => TransmitterPreferenceUseEnum.The_Host_has_no_preference_among_the_transmitter_PHYs_supported_by_the_Controller, 
				_ => TransmitterPreferenceUseEnum.InvalidTransmitterPreferenceUseValue, 
			};
		}

		public static uint TransmitterPreferenceUseToValue(TransmitterPreferenceUseEnum enumItem)
		{
			return enumItem switch
			{
				TransmitterPreferenceUseEnum.The_Host_prefers_the_Controller_to_use_the_transmitter_PHYs_specified_in_the_TX_PHYS_field => 0u, 
				TransmitterPreferenceUseEnum.The_Host_has_no_preference_among_the_transmitter_PHYs_supported_by_the_Controller => 1u, 
				_ => uint.MaxValue, 
			};
		}

		public static string TransmitterPreferenceUseToString(TransmitterPreferenceUseEnum enumItem)
		{
			return enumItem switch
			{
				TransmitterPreferenceUseEnum.The_Host_prefers_the_Controller_to_use_the_transmitter_PHYs_specified_in_the_TX_PHYS_field => "The Host prefers the Controller to use the transmitter PHYs specified in the TX_PHYS field", 
				TransmitterPreferenceUseEnum.The_Host_has_no_preference_among_the_transmitter_PHYs_supported_by_the_Controller => "The Host has no preference among the transmitter PHYs supported by the Controller", 
				_ => "Invalid TransmitterPreferenceUse Value", 
			};
		}

		public static string TransmitterPreferenceUseToDescription()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendLine("0x0 = The Host prefers the Controller to use the transmitter PHYs specified in the TX_PHYS field");
			stringBuilder.AppendLine("0x1 = The Host has no preference among the transmitter PHYs supported by the Controller");
			return stringBuilder.ToString();
		}
	}

	public enum ReceiverPreferenceUseEnum
	{
		The_Host_prefers_the_Controller_to_use_the_receiver_PHYs_specified_in_the_RX_PHYS_field,
		The_Host_has_no_preference_among_the_receiver_PHYs_supported_by_the_Controller,
		InvalidReceiverPreferenceUseValue
	}

	public static class ReceiverPreferenceUseInfo
	{
		public static ReceiverPreferenceUseEnum ValueToReceiverPreferenceUse(uint value)
		{
			return value switch
			{
				0u => ReceiverPreferenceUseEnum.The_Host_prefers_the_Controller_to_use_the_receiver_PHYs_specified_in_the_RX_PHYS_field, 
				1u => ReceiverPreferenceUseEnum.The_Host_has_no_preference_among_the_receiver_PHYs_supported_by_the_Controller, 
				_ => ReceiverPreferenceUseEnum.InvalidReceiverPreferenceUseValue, 
			};
		}

		public static uint ReceiverPreferenceUseToValue(ReceiverPreferenceUseEnum enumItem)
		{
			return enumItem switch
			{
				ReceiverPreferenceUseEnum.The_Host_prefers_the_Controller_to_use_the_receiver_PHYs_specified_in_the_RX_PHYS_field => 0u, 
				ReceiverPreferenceUseEnum.The_Host_has_no_preference_among_the_receiver_PHYs_supported_by_the_Controller => 1u, 
				_ => uint.MaxValue, 
			};
		}

		public static string ReceiverPreferenceUseToString(ReceiverPreferenceUseEnum enumItem)
		{
			return enumItem switch
			{
				ReceiverPreferenceUseEnum.The_Host_prefers_the_Controller_to_use_the_receiver_PHYs_specified_in_the_RX_PHYS_field => "The Host prefers the Controller to use the receiver PHYs specified in the RX_PHYS field", 
				ReceiverPreferenceUseEnum.The_Host_has_no_preference_among_the_receiver_PHYs_supported_by_the_Controller => "The Host has no preference among the receiver PHYs supported by the Controller", 
				_ => "Invalid ReceiverPreferenceUse Value", 
			};
		}

		public static string ReceiverPreferenceUseToDescription()
		{
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendLine("0x0 = The Host prefers the Controller to use the receiver PHYs specified in the RX_PHYS field");
			stringBuilder.AppendLine("0x1 = The Host has no preference among the receiver PHYs supported by the Controller");
			return stringBuilder.ToString();
		}
	}

	private TransmitterPreferenceUseEnum _TransmitterPreferenceUse;

	private ReceiverPreferenceUseEnum _ReceiverPreferenceUse;

	public TransmitterPreferenceUseEnum TransmitterPreferenceUse
	{
		get
		{
			return _TransmitterPreferenceUse;
		}
		set
		{
			_TransmitterPreferenceUse = value;
		}
	}

	public ReceiverPreferenceUseEnum ReceiverPreferenceUse
	{
		get
		{
			return _ReceiverPreferenceUse;
		}
		set
		{
			_ReceiverPreferenceUse = value;
		}
	}
}
