namespace Wizard;

public class GachaUtil
{
	public static string GetRewardListGoodsTypeName(UserGoods userGoods)
	{
		switch (userGoods.GoodsType)
		{
		case UserGoods.Type.Sleeve:
			if (!Data.Master.SleeveMgr.Get(userGoods.Id).IsPremiumSleeve)
			{
				return Data.SystemText.Get("Shop_0227");
			}
			return Data.SystemText.Get("Shop_0230");
		case UserGoods.Type.Emblem:
			return Data.SystemText.Get("Shop_0228");
		case UserGoods.Type.Degree:
			if (!Data.Master.DegreeMgr.Get((int)userGoods.Id).IsPremium)
			{
				return Data.SystemText.Get("Shop_0231");
			}
			return Data.SystemText.Get("Shop_0250");
		case UserGoods.Type.Skin:
			return Data.SystemText.Get("Shop_0229");
		case UserGoods.Type.MyPageBG:
			return Data.SystemText.Get("MyPage_0102");
		default:
			Debug.LogError($"unsupported UserGoods.Type : {userGoods.GoodsType}");
			return string.Empty;
		}
	}

	public static int GetRewardListSortIndex(UserGoods userGoods)
	{
		switch (userGoods.GoodsType)
		{
		case UserGoods.Type.Sleeve:
			if (!Data.Master.SleeveMgr.Get(userGoods.Id).IsPremiumSleeve)
			{
				return 2;
			}
			return 3;
		case UserGoods.Type.Emblem:
			return 1;
		case UserGoods.Type.Degree:
			return 4;
		case UserGoods.Type.Skin:
			return 0;
		case UserGoods.Type.MyPageBG:
			return 5;
		default:
			Debug.LogError($"unsupported UserGoods.Type : {userGoods.GoodsType}");
			return int.MaxValue;
		}
	}
}
