using System.Collections.Generic;
using QC.QTMInterface;

namespace QC.QSPRAutomation.Internal;

internal class QSPR2Compatability
{
	private enum QSPR2TreeStatus
	{
		Idle,
		Queued,
		TargetQueued,
		Running,
		Stopped,
		Warning,
		Pass,
		Fail,
		Fatal,
		Paused,
		Aborted,
		Looping,
		Final,
		Skipped,
		UserUpdatne,
		Unqueued,
		Reset,
		PassAndFail,
		StatusMax
	}

	private Dictionary<int, int> testStatusMap = new Dictionary<int, int>();

	public QSPR2Compatability()
	{
		UpdatStatuseMap();
	}

	public int GetMappedTestStatus(TestResult result)
	{
		return testStatusMap[(int)result];
	}

	private void UpdatStatuseMap()
	{
		testStatusMap.Add(1, 6);
		testStatusMap.Add(0, 7);
		testStatusMap.Add(5, 3);
		testStatusMap.Add(2, 8);
		testStatusMap.Add(6, 9);
	}
}
