using System.Collections.Generic;
using QC.QMSLPhone;

namespace QFDT_Components;

public class PropertyValueMap
{
	public static readonly Dictionary<string, uint> FTM_RF_Debug_Tech_Map = new Dictionary<string, uint>
	{
		{ "CDMA", 0u },
		{ "WCDMA", 1u },
		{ "GSM", 2u },
		{ "LTE", 3u },
		{ "TDSCDMA", 4u },
		{ "NR5GSUB6", 7u }
	};

	public static readonly Dictionary<string, byte> Radio_Cfg_Path_Value_Map = new Dictionary<string, byte>
	{
		{ "Tx", 0 },
		{ "PRx", 1 },
		{ "DRx", 2 }
	};

	public static readonly Dictionary<string, byte> Radio_Cfg_Path_Value_Map_SUB6 = new Dictionary<string, byte>
	{
		{ "Tx", 0 },
		{ "Rx", 1 }
	};

	public static readonly Dictionary<string, int> Radio_Cfg_WFM_Value_Map = new Dictionary<string, int>
	{
		{ "DEFAULT", 0 },
		{ "CW", 1 },
		{ "OFFSET_CW", 2 },
		{ "LTE_PUSCH", 3 },
		{ "EUL", 4 },
		{ "DPD", 5 },
		{ "Dual Carrier", 6 },
		{ "SUB6 PUSCH", 7 }
	};

	public static readonly Dictionary<string, int> Radio_Cfg_BW_Map = new Dictionary<string, int>
	{
		{ "1.4MHz", 0 },
		{ "3MHz", 1 },
		{ "5MHz", 2 },
		{ "10MHz", 3 },
		{ "15MHz", 4 },
		{ "20MHz", 5 },
		{ "40MHz", 6 }
	};

	public static readonly Dictionary<string, int> Radio_Cfg_BW_Map_SUB6 = new Dictionary<string, int>
	{
		{ "5MHz", 0 },
		{ "10MHz", 1 },
		{ "15MHz", 2 },
		{ "20MHz", 3 },
		{ "25MHz", 4 },
		{ "30MHz", 5 },
		{ "40MHz", 6 },
		{ "50MHz", 7 },
		{ "60MHz", 8 },
		{ "80MHz", 9 },
		{ "100MHz", 10 }
	};

	public static readonly Dictionary<string, int> Radio_Cfg_Setup_Type_Map = new Dictionary<string, int>
	{
		{ "TECH_BAND_RFMPATH_CHAN", 0 },
		{ "BAND_RFMPATH_CHAN", 1 },
		{ "RFMPATH_CHAN", 2 },
		{ "CHAN", 3 },
		{ "BANDWIDTH", 4 },
		{ "ANTENNA_SWITCH", 5 }
	};

	public static readonly Dictionary<string, uint> Radio_Cfg_Property_Type_Map = new Dictionary<string, uint>
	{
		{ "Is Tear Down", 1u },
		{ "Radio Setup Type", 2u },
		{ "RFM Device", 3u },
		{ "Signal Path", 4u },
		{ "Antenna Path", 5u },
		{ "RFM Path Type", 6u },
		{ "Band", 7u },
		{ "Subband", 8u },
		{ "Reserved", 9u },
		{ "Channel", 10u },
		{ "Tx Waveform Type", 11u },
		{ "Bandwidth", 12u },
		{ "Number Of RBs", 13u },
		{ "Start RB Index", 14u },
		{ "CW Offset", 15u },
		{ "Is_DC", 16u },
		{ "Mod_Type", 17u },
		{ "Change_Mod", 22u },
		{ "PLL_ID", 25u },
		{ "Tune_Tx_To_Rx_Freq", 26u },
		{ "Frequency", 28u },
		{ "Version", 29u },
		{ "Switch TDS waveform", 30u },
		{ "Change Modulation", 31u }
	};

	public static readonly Dictionary<string, uint> Tx_Override_Property_Type_Map = new Dictionary<string, uint>
	{
		{ "Reserved", 0u },
		{ "Tx Enable", 1u },
		{ "Path Index", 2u },
		{ "Signal Path", 3u },
		{ "RFM Device", 4u },
		{ "Antenna Path", 5u },
		{ "XPT Mode", 6u },
		{ "IQ Gain Action Type", 7u },
		{ "IQ Gain", 8u },
		{ "TxFE Gain Action Type", 9u },
		{ "TxFE Gain", 10u },
		{ "Env Scale Action Type", 11u },
		{ "Env Scale", 12u },
		{ "RGI", 13u },
		{ "PA Bias", 14u },
		{ "PA State", 15u },
		{ "PA Current", 16u },
		{ "Delay Action Type", 17u },
		{ "Delay", 18u },
		{ "Data Type", 19u },
		{ "Slot Number", 20u },
		{ "Data Source", 21u },
		{ "Modulation Type", 22u },
		{ "Env Gain", 23u },
		{ "PLL_ID", 29u },
		{ "SPR Action", 30u }
	};

	public static readonly Dictionary<string, int> Tx_Override_XPTMode_Map = new Dictionary<string, int>
	{
		{ "APT", 0 },
		{ "EPT", 1 },
		{ "ET", 2 }
	};

	public static readonly Dictionary<string, int> Tx_Override_GainType_Map = new Dictionary<string, int>
	{
		{ "Skip", 0 },
		{ "Override", 1 },
		{ "Use Sw Default value", 2 },
		{ "Use NV value", 3 }
	};

	public static readonly Dictionary<string, int> Tx_Override_DelayType_Map = new Dictionary<string, int>
	{
		{ "Skip", 0 },
		{ "Override", 1 },
		{ "Use Sw Default value", 2 },
		{ "Use NV value", 3 },
		{ "Use RC Tuner Component", 4 },
		{ "Use NV with Delay Temp Comp", 5 }
	};

	public static readonly Dictionary<string, int> Tx_Override_SPR_Action_Map = new Dictionary<string, int>
	{
		{ "Default", 0 },
		{ "TxLM", 1 }
	};

	public static readonly Dictionary<string, uint> Rx_Override_Property_Type_Map = new Dictionary<string, uint>
	{
		{ "Reserved", 0u },
		{ "RF Path Index", 1u },
		{ "Signal Path", 2u },
		{ "RFM device", 3u },
		{ "Antenna Path", 4u },
		{ "Expected AGC", 5u },
		{ "LNA Gain State", 6u },
		{ "AGC Offset Result", 7u },
		{ "Raw NBEE Reading", 8u },
		{ "Signal Type", 9u },
		{ "GSM Data Type", 10u },
		{ "GSM RSSI", 11u },
		{ "GSM Rx Enable", 12u },
		{ "PLL_ID", 13u }
	};

	public static readonly Dictionary<string, int> Rx_Override_SigType_Map = new Dictionary<string, int>
	{
		{ "CW", 0 },
		{ "modulated signal", 1 }
	};

	public static void AddOnePropertyToList(ref List<FTM_RF_Debug_Property_Date_Type> ps, uint input_type, long input_value)
	{
		FTM_RF_Debug_Property_Date_Type item = default(FTM_RF_Debug_Property_Date_Type);
		item.type = input_type;
		item.value = input_value;
		ps.Add(item);
	}
}
