using System;
using UnityEngine;

public class MyPageHomeStatic : MonoBehaviour
{
	[SerializeField]
	private MyPageCenterCard _centerCardMove;

	[SerializeField]
	private MyPageCharaMenu _charaMenu;

	[SerializeField]
	private MyPageCardDetail _cardDetail;

	[SerializeField]
	private GameObject _contentsRoot;

	[SerializeField]
	private MyPageMenu _myPageMenu;

	public bool CardLoadFinish => _centerCardMove.CardLoadFinish;

	public void SetActive(bool isActive)
	{
		_contentsRoot.SetActive(isActive);
	}

	public void CenterCardCreateStart(Action onFinish)
	{
		_centerCardMove.LoadDeckInfo(onFinish);
	}

	public void OnDestroy()
	{
		if (_charaMenu != null)
		{
			_charaMenu.SaveCenterCardIndex();
		}
	}

	public void Show()
	{
		_contentsRoot.SetActive(value: true);
		AspectCameraPerspective[] array = UnityEngine.Object.FindObjectsOfType<AspectCameraPerspective>();
		for (int i = 0; i < array.Length; i++)
		{
			array[i].UpdateFov();
		}
		_centerCardMove.MoveInCameraCard();
	}

	public void StartCardUpAnimation()
	{
		_centerCardMove.MoveInCameraCard();
	}

	public void Hide()
	{
		_contentsRoot.SetActive(value: false);
	}

	public int GetDetailCardCount()
	{
		return _centerCardMove.GetDetailCardCount();
	}

	public void Initialize()
	{
		_cardDetail.MyPageMenuClass = _myPageMenu;
	}

	public void SetTutorialMode()
	{
		UIManager.SetObjectToGrey(_charaMenu.EvolutionButton.gameObject, b: true);
	}

	public void FinishFirstTips()
	{
		bool activeSelf = _charaMenu.EvolutionButton.gameObject.activeSelf;
		UIManager.SetObjectToGrey(_charaMenu.EvolutionButton.gameObject, b: false);
		_charaMenu.EvolutionButton.gameObject.SetActive(activeSelf);
	}

	public void ReloadCardCircle()
	{
		_centerCardMove.ReloadCardCircle();
	}
}
