using System;
using QCRPG.Framework;

namespace QCRPG.TSL.FMHCI.Packets;

public class SearchRdsInProgressInfo : PacketInfoBase
{
	public override string Name => "Search Rds In Progress";

	public override string DisplayGroup => "Events";

	public SearchRdsInProgressInfo(SearchRdsInProgress packet)
		: base(packet)
	{
		UpdateFieldInfoFromPacket();
	}

	public override void UpdateFieldInfoFromPacket()
	{
		SearchRdsInProgress searchRdsInProgress = (SearchRdsInProgress)packet;
		fieldInfoList.Clear();
		fieldInfoList.Add(new PacketFieldInfo("Search RDS Mode", "", 8, FormatValue(searchRdsInProgress.UserFields.SearchRdsMode, 8), "", "", "", settable: true, littleEndianTransport: false, omitFromTransport: false, DataEntryMode.RightAlignedHex));
	}

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