using System.Collections.Generic;
using LitJson;

namespace Wizard;

public class ColosseumDeckEntryTask : BaseTask
{
	public class ColosseumDeckEntryTaskParam : BaseParam
	{
		public string deck_no_list;

		public bool is_published;
	}

	public ColosseumDeckEntryTask()
	{
		base.type = ApiType.Type.ColosseumDeckEntry;
	}

	public void SetParameter(List<DeckData> deckList, bool isPublished)
	{
		ColosseumDeckEntryTaskParam colosseumDeckEntryTaskParam = new ColosseumDeckEntryTaskParam();
		List<int> list = new List<int>();
		for (int i = 0; i < deckList.Count; i++)
		{
			list.Add(deckList[i].GetDeckID());
		}
		colosseumDeckEntryTaskParam.deck_no_list = JsonMapper.ToJson(list);
		colosseumDeckEntryTaskParam.is_published = isPublished;
		base.Params = colosseumDeckEntryTaskParam;
	}
}
