using System;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class SetEventMaskPage2Info : PacketInfoBase
{
	public override string Name => "Set Event Mask Page 2";

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

	public SetEventMaskPage2Info(SetEventMaskPage2 packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		SetEventMaskPage2 setEventMaskPage = (SetEventMaskPage2)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("Event_Mask_Page_2", SetEventMaskPage2.UserFieldsWrapper.EventMaskPage2Info.EventMaskPage2ToDescription(), 64, FormatValue(setEventMaskPage.UserFields.EventMaskPage2, 64), SetEventMaskPage2.UserFieldsWrapper.EventMaskPage2Info.EventMaskPage2ToString(SetEventMaskPage2.UserFieldsWrapper.EventMaskPage2Info.ValueToEventMaskPage2(setEventMaskPage.UserFields.EventMaskPage2)), "", "", settable: true, littleEndianTransport: true, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

	public override void UpdatePacketFromFieldInfo(int index, string value)
	{
		SetEventMaskPage2 setEventMaskPage = (SetEventMaskPage2)packet;
		int num = -1;
		if (index == ++num)
		{
			setEventMaskPage.UserFields.EventMaskPage2 = Convert.ToUInt64(value, 16);
		}
	}
}
