using System;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class WriteSecureConnectionsHostSupportInfo : PacketInfoBase
{
	public override string Name => "Write Secure Connections Host Support";

	public override string DisplayGroup => "Host Control and Baseband";

	public WriteSecureConnectionsHostSupportInfo(WriteSecureConnectionsHostSupport packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		WriteSecureConnectionsHostSupport writeSecureConnectionsHostSupport = (WriteSecureConnectionsHostSupport)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("Secure_Connections_Host_Support", WriteSecureConnectionsHostSupport.UserFieldsWrapper.SecureConnectionsHostSupportInfo.SecureConnectionsHostSupportToDescription(), 8, FormatValue(writeSecureConnectionsHostSupport.UserFields.SecureConnectionsHostSupport, 8), WriteSecureConnectionsHostSupport.UserFieldsWrapper.SecureConnectionsHostSupportInfo.SecureConnectionsHostSupportToString(WriteSecureConnectionsHostSupport.UserFieldsWrapper.SecureConnectionsHostSupportInfo.ValueToSecureConnectionsHostSupport(writeSecureConnectionsHostSupport.UserFields.SecureConnectionsHostSupport)), "", "", settable: true, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

	public override void UpdatePacketFromFieldInfo(int index, string value)
	{
		WriteSecureConnectionsHostSupport writeSecureConnectionsHostSupport = (WriteSecureConnectionsHostSupport)packet;
		int num = -1;
		if (index == ++num)
		{
			writeSecureConnectionsHostSupport.UserFields.SecureConnectionsHostSupport = Convert.ToUInt32(value, 16);
		}
	}
}
