using UnityEngine;

namespace Wizard;

public class MyPageRewardDialogBoxCount : MonoBehaviour
{
	[SerializeField]
	private UILabel _label;

	public static GameObject Create(GameObject prefab, CampaignBattleWin info)
	{
		GameObject obj = Object.Instantiate(prefab);
		obj.GetComponentInChildren<MyPageRewardDialogBoxCount>().Initialize(info);
		return obj;
	}

	private void Initialize(CampaignBattleWin info)
	{
		string text = "";
		switch (info.BoxStatus)
		{
		case CampaignBattleWin.eBoxStatus.NO_GET:
			text = Data.SystemText.Get("MyPage_0078");
			break;
		case CampaignBattleWin.eBoxStatus.ACTIVE:
			text = Data.SystemText.Get("MyPage_0079");
			break;
		case CampaignBattleWin.eBoxStatus.ALREADY_GET:
			text = Data.SystemText.Get("MyPage_0080");
			break;
		}
		_label.text = Data.SystemText.Get("MyPage_0077") + "    " + text;
	}
}
