using System;
using System.Collections.Generic;
using System.Linq;
using Wizard.DeckCardEdit;

namespace Wizard;

public class RotationFormatBehavior : IFormatBehavior
{
	public string Name => Data.SystemText.Get("Common_0154");

	public string SmallIconSpriteName => "icon_timesliprotation_s";

	public CardMaster.CardMasterId CardMasterId => CardMaster.CardMasterId.Default;

	public GenerateDeckCodeTask.SubmitDeckType DeckCodeType => GenerateDeckCodeTask.SubmitDeckType.NORMAL;

	public bool ExistsRestrictedCard => false;

	public List<int> SortedDeckUsableCardList => CardMaster.GetInstance(CardMasterId).GetAllCardIds();

	public int DeckCardNumMin => DeckCardNumMax;

	public int DeckCardNumMax => 40;

	public int DeckSameKindCardNumMax => 3;

	public int DeckSavableCardNumMax => 50;

	public bool IsShowDeckName => true;

	public bool IsEmphasizeDeckCardShortage => false;

	public bool IsEmphasizeDeckCardOverage => true;

	public bool IsSavableLastSelectDeck => true;

	public bool CanShowQRCode => true;

	public bool IsShowFirstTipsAtDeckEdit => true;

	public bool IsShowAutoDeckCreateButtonAtDeckEdit => true;

	public bool IsCraftableCardAtDeckEdit => true;

	public UIManager.ViewScene DeckEditBackScene => UIManager.ViewScene.DeckList;

	public Action<CardBundleController> DeckSaveFunc => null;

	public bool UseSubClass => false;

	public List<CardSetName> AvailableCardSetNameList => (from id in Data.Load.data.RotationCardSetList.Distinct()
		select Data.Master.CardSetNameMgr.Get(id.ToString())).ToList();

	public bool IsShowPrizeCardSetFilter => true;

	public bool IsShowPhantomCardSetFilter => false;

	public bool IsShowFormatFilter => false;

	public bool IsShowFavoriteFilter => true;

	public bool IsShowSpotCardFilter => GameMgr.GetIns().GetDataMgr().SpotCardData.ExistsSpotCard();

	public bool IsConventionMode => false;

	public bool IsEnableDeckShareButton(int cardNum, int cardNumMax)
	{
		return cardNum == DeckCardNumMax;
	}

	public IDictionary<int, int> GetCardPool(bool isIncludingSpotCard)
	{
		return GameMgr.GetIns().GetDataMgr().GetUserOwnCardData(isIncludingSpotCard);
	}

	public Dictionary<int, int> ClonePossessionCardDictionary(bool isIncludingSpotCard)
	{
		return GameMgr.GetIns().GetDataMgr().ClonePossessionCardDictionary(isIncludingSpotCard);
	}

	public int GetPossessionCardNum(int cardId, bool isIncludingSpotCard)
	{
		return GameMgr.GetIns().GetDataMgr().GetPossessionCardNum(cardId, isIncludingSpotCard);
	}

	public int GetPossessionBaseCardNum(int baseCardId, bool isIncludingSpotCard)
	{
		return GameMgr.GetIns().GetDataMgr().GetPossessionBaseCardNum(baseCardId, isIncludingSpotCard, CardMasterId);
	}
}
