using System.Collections.Generic;
using System.Text;

namespace QCRPG.TSL.BT.Packets;

public static class SupportedCommandsInfo
{
	public static SupportedCommandsEnumCollection ValueToSupportedCommands(List<uint> valueList)
	{
		SupportedCommandsEnumCollection supportedCommandsEnumCollection = new SupportedCommandsEnumCollection();
		supportedCommandsEnumCollection.Inquiry = SupportBitInfo.ValueToSupportBit(valueList[0] & 1u);
		return supportedCommandsEnumCollection;
	}

	public static List<uint> SupportedCommandsToValue(SupportedCommandsEnumCollection enumCollection)
	{
		List<uint> list = new List<uint>();
		list[0] |= SupportBitInfo.SupportBitToValue(enumCollection.Inquiry);
		return list;
	}

	public static string SupportedCommandsToString(SupportedCommandsEnumCollection enumCollection)
	{
		string text = "";
		text = text + "Inquiry: " + SupportBitInfo.SupportBitToString(enumCollection.Inquiry) + "\r\n";
		return text.TrimEnd('\r', '\n');
	}

	public static string SupportedCommandsToDescription()
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.AppendLine("Bit 0: Inquiry");
		stringBuilder.AppendLine(SupportBitInfo.SupportBitToDescription());
		return stringBuilder.ToString();
	}
}
