using System;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class LeRemoveCigInfo : PacketInfoBase
{
	public override string Name => "Le Remove Cig";

	public override string DisplayGroup => "LE Controller";

	public LeRemoveCigInfo(LeRemoveCig packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		LeRemoveCig leRemoveCig = (LeRemoveCig)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("CIG_ID", "", 8, FormatValue(leRemoveCig.UserFields.CigId, 8), "", "0", "EF", settable: true, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

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