using System;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class InitializeTheWsiMciInterfaceInfo : PacketInfoBase
{
	public override string Name => "Initialize The Wsi Mci Interface";

	public override string DisplayGroup => "Vendor Specific";

	public InitializeTheWsiMciInterfaceInfo(InitializeTheWsiMciInterface packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		InitializeTheWsiMciInterface initializeTheWsiMciInterface = (InitializeTheWsiMciInterface)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("SubOpCode", "HCI_VS_VI_CMS_SUBCMD_MCI_INIT", 8, FormatValue(initializeTheWsiMciInterface.UserFields.Subopcode, 8), "", "", "", settable: false, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

	public override void UpdatePacketFromFieldInfo(int index, string value)
	{
		_ = (InitializeTheWsiMciInterface)packet;
		int num = -1;
		if (index == ++num)
		{
			throw new Exception("Tried to set non-settable field Subopcode");
		}
	}
}
