using System;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class WriteSimplePairingDebugModeInfo : PacketInfoBase
{
	public override string Name => "Write Simple Pairing Debug Mode";

	public override string DisplayGroup => "Testing";

	public WriteSimplePairingDebugModeInfo(WriteSimplePairingDebugMode packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		WriteSimplePairingDebugMode writeSimplePairingDebugMode = (WriteSimplePairingDebugMode)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("Simple_Pairing_Debug_Mode", WriteSimplePairingDebugMode.UserFieldsWrapper.SimplePairingDebugModeInfo.SimplePairingDebugModeToDescription(), 8, FormatValue(writeSimplePairingDebugMode.UserFields.SimplePairingDebugMode, 8), WriteSimplePairingDebugMode.UserFieldsWrapper.SimplePairingDebugModeInfo.SimplePairingDebugModeToString(WriteSimplePairingDebugMode.UserFieldsWrapper.SimplePairingDebugModeInfo.ValueToSimplePairingDebugMode(writeSimplePairingDebugMode.UserFields.SimplePairingDebugMode)), "", "", settable: true, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

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