using System;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class LeBigTerminateSyncInfo : PacketInfoBase
{
	public override string Name => "Le Big Terminate Sync";

	public override string DisplayGroup => "LE Controller";

	public LeBigTerminateSyncInfo(LeBigTerminateSync packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		LeBigTerminateSync leBigTerminateSync = (LeBigTerminateSync)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("BIG_Handle", "Used to identify the Broadcast Isochronous Group.", 8, FormatValue(leBigTerminateSync.UserFields.BigHandle, 8), "", "0", "EF", settable: true, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

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