using System;
using Cpp2IlInjected;
using DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using MarsSDK;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x0200025F RID: 607
[Token(Token = "0x200025F")]
public class UIOpeningMenu : GameCanvasBase
{
	// Token: 0x06001769 RID: 5993 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001769")]
	[Address(RVA = "0x1023C30", Offset = "0x1022A30", VA = "0x181023C30", Slot = "11")]
	public override void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600176A RID: 5994 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600176A")]
	[Address(RVA = "0x10239B0", Offset = "0x10227B0", VA = "0x1810239B0", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600176B RID: 5995 RVA: 0x00039198 File Offset: 0x00037398
	[Token(Token = "0x600176B")]
	[Address(RVA = "0x1025040", Offset = "0x1023E40", VA = "0x181025040")]
	private void VerifyVideoHandler()
	{
		bool flag = Game.Collection.gameCleared > 0;
		this.showVideoHandler = flag;
		if (this.handlers[3].gameObject.activeSelf != this.showVideoHandler)
		{
			GameObject gameObject = this.handlers[3].gameObject;
			bool flag2 = this.showVideoHandler;
			gameObject.SetActive(flag2);
			UILabelHandler[] array = this.SetupHandlerNavigation();
			return;
		}
	}

	// Token: 0x0600176C RID: 5996 RVA: 0x0003920C File Offset: 0x0003740C
	[Token(Token = "0x600176C")]
	[Address(RVA = "0x1024AD0", Offset = "0x10238D0", VA = "0x181024AD0")]
	private bool ShowVideoHandler()
	{
		return Game.Collection.gameCleared > 0;
	}

	// Token: 0x0600176D RID: 5997 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600176D")]
	[Address(RVA = "0x10248D0", Offset = "0x10236D0", VA = "0x1810248D0")]
	private UILabelHandler[] SetupHandlerNavigation()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600176E RID: 5998 RVA: 0x00039230 File Offset: 0x00037430
	[Token(Token = "0x600176E")]
	[Address(RVA = "0x764EC0", Offset = "0x763CC0", VA = "0x180764EC0", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		this.navigator.Move(direction);
	}

	// Token: 0x0600176F RID: 5999 RVA: 0x00039250 File Offset: 0x00037450
	[Token(Token = "0x600176F")]
	[Address(RVA = "0x1024620", Offset = "0x1023420", VA = "0x181024620")]
	public void OnSceneMenuClosed()
	{
		if (!this.isTitleScreenEnabled)
		{
			Game.GetUIStackingManager().ExecuteCommand();
			return;
		}
		((IUIController)this).SwitchLeftward();
	}

	// Token: 0x06001770 RID: 6000 RVA: 0x00039280 File Offset: 0x00037480
	[Token(Token = "0x6001770")]
	[Address(RVA = "0x1024520", Offset = "0x1023320", VA = "0x181024520")]
	private void OnHandlerSelected(UIHandlerBase handler)
	{
		UINavigationEffect uinavigationEffect = this.navigationEffect;
		Vector2 anchoredPosition = handler.rectTransform.anchoredPosition;
		uinavigationEffect.root.anchoredPosition = anchoredPosition;
		UILabelHandler[] array = this.handlers;
		UINavigationEffect uinavigationEffect2 = this.navigationEffect;
		int index = handler.index;
		UILabelHandler uilabelHandler = array[index];
		uinavigationEffect2.UpdateArrowPos(uilabelHandler);
		this.navigationEffect.Appear();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001771 RID: 6001 RVA: 0x000392EC File Offset: 0x000374EC
	[Token(Token = "0x6001771")]
	[Address(RVA = "0x76AA60", Offset = "0x769860", VA = "0x18076AA60")]
	private void OnHandlerDeselected(UIHandlerBase handler)
	{
		this.navigationEffect.Hide();
	}

	// Token: 0x06001772 RID: 6002 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001772")]
	[Address(RVA = "0x1024B30", Offset = "0x1023930", VA = "0x181024B30", Slot = "21")]
	public override void Submit()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001773 RID: 6003 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001773")]
	[Address(RVA = "0xEBB940", Offset = "0xEBA740", VA = "0x180EBB940")]
	private void OpenCanvas<T>(GameSavePageMode mode = GameSavePageMode.None) where T : GameCanvasBase
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001774 RID: 6004 RVA: 0x0003930C File Offset: 0x0003750C
	[Token(Token = "0x6001774")]
	[Address(RVA = "0x10246B0", Offset = "0x10234B0", VA = "0x1810246B0")]
	private void PerformSubmitEffect()
	{
		RectTransform rectTransform = this.submissionEffect.rectTransform;
		Vector2 anchoredPosition = this.navigator.currentHandler.rectTransform.anchoredPosition;
		rectTransform.anchoredPosition = anchoredPosition;
		this.submissionEffect.gameObject.SetActive(true);
	}

	// Token: 0x06001775 RID: 6005 RVA: 0x0003935C File Offset: 0x0003755C
	[Token(Token = "0x6001775")]
	[Address(RVA = "0x1024E50", Offset = "0x1023C50", VA = "0x181024E50")]
	private void Suspend()
	{
		Game.UnbindUIController();
		Game.DisablePauseMenuAction();
		this.isTitleScreenEnabled = false;
		Game.GetUIStackingManager().Record();
		CanvasGroup canvasGroup = this.foreground;
		int num = 0;
		canvasGroup.blocksRaycasts = num != 0;
		CanvasGroup canvasGroup2 = this.foreground;
		int num2 = 0;
		int num3 = canvasGroup2.DOKill(num2 != 0);
		CanvasGroup canvasGroup3 = this.foreground;
		int num4 = 0;
		TweenerCore<float, float, FloatOptions> tweenerCore = DOTweenModuleUI.DOFade(canvasGroup3, (float)num4, 1f).SetEase((Ease)((uint)3)).Play<TweenerCore<float, float, FloatOptions>>();
	}

	// Token: 0x06001776 RID: 6006 RVA: 0x000393E0 File Offset: 0x000375E0
	[Token(Token = "0x6001776")]
	[Address(RVA = "0x1024740", Offset = "0x1023540", VA = "0x181024740")]
	private void Resume()
	{
		Game.BindUIController(this);
		Game.EnablePauseMenuAction();
		this.isTitleScreenEnabled = true;
		Game.GetUIStackingManager().Stop();
		this.foreground.blocksRaycasts = true;
		CanvasGroup canvasGroup = this.foreground;
		int num = 0;
		int num2 = canvasGroup.DOKill(num != 0);
		TweenerCore<float, float, FloatOptions> tweenerCore = DOTweenModuleUI.DOFade(this.foreground, 1f, 0.35f);
		int num3 = 0;
		TweenerCore<float, float, FloatOptions> tweenerCore2 = TweenSettingsExtensions.From<float, float, FloatOptions>(tweenerCore, (float)num, true, num3 != 0).SetEase((Ease)((uint)3)).Play<TweenerCore<float, float, FloatOptions>>();
		GameObject gameObject = this.submissionEffect.gameObject;
		int num4 = 0;
		gameObject.SetActive(num4 != 0);
	}

	// Token: 0x06001777 RID: 6007 RVA: 0x00039480 File Offset: 0x00037680
	[Token(Token = "0x6001777")]
	[Address(RVA = "0x1024F80", Offset = "0x1023D80", VA = "0x181024F80")]
	private void UpdateTitleScreenEnabledState(bool isEnabled)
	{
		this.isTitleScreenEnabled = isEnabled;
		if (!isEnabled)
		{
			Game.GetUIStackingManager().Record();
			return;
		}
		Game.GetUIStackingManager().Stop();
	}

	// Token: 0x06001778 RID: 6008 RVA: 0x000394B8 File Offset: 0x000376B8
	[Token(Token = "0x6001778")]
	[Address(RVA = "0x10241A0", Offset = "0x1022FA0", VA = "0x1810241A0", Slot = "25")]
	public override void Localize(LocalizationData data)
	{
		UILabelHandler uilabelHandler = this.handlers[0];
		string text = data.systemText.GetText(281);
		uilabelHandler.SetLabel(text);
		UILabelHandler[] array = this.handlers;
		GameTextData systemText = data.systemText;
		UILabelHandler uilabelHandler2 = array[1];
		string text2 = systemText.GetText(282);
		uilabelHandler2.SetLabel(text2);
		UILabelHandler[] array2 = this.handlers;
		GameTextData systemText2 = data.systemText;
		UILabelHandler uilabelHandler3 = array2[2];
		string text3 = systemText2.GetText(283);
		uilabelHandler3.SetLabel(text3);
		UILabelHandler[] array3 = this.handlers;
		GameTextData systemText3 = data.systemText;
		UILabelHandler uilabelHandler4 = array3[3];
		string text4 = systemText3.GetText(285);
		uilabelHandler4.SetLabel(text4);
		UILabelHandler[] array4 = this.handlers;
		GameTextData systemText4 = data.systemText;
		UILabelHandler uilabelHandler5 = array4[4];
		string text5 = systemText4.GetText(286);
		uilabelHandler5.SetLabel(text5);
		UILabelHandler[] array5 = this.handlers;
		int num = 0;
		int length = array5.Length;
		if (num < length)
		{
			GameFontPack fontPack = data.fontPack;
			Text label = array5[num].label;
			Font medium = fontPack.medium;
			label.font = medium;
			num++;
		}
		GameFontPack fontPack2 = data.fontPack;
		Text text6 = this.copyright;
		Font light = fontPack2.light;
		text6.font = light;
		GameFontPack fontPack3 = data.fontPack;
		Text text7 = this.version;
		Font light2 = fontPack3.light;
		text7.font = light2;
		if (this.navigator.currentHandler)
		{
			UINavigator navigator = this.navigator;
			UINavigationEffect uinavigationEffect = this.navigationEffect;
			UIHandlerBase currentHandler = navigator.currentHandler;
			UILabelHandler[] array6 = this.handlers;
			int index = currentHandler.index;
			UILabelHandler uilabelHandler6 = array6[index];
			uinavigationEffect.UpdateArrowPos(uilabelHandler6);
		}
	}

	// Token: 0x06001779 RID: 6009 RVA: 0x00039690 File Offset: 0x00037890
	[Token(Token = "0x6001779")]
	[Address(RVA = "0x769BF0", Offset = "0x7689F0", VA = "0x180769BF0")]
	public UIOpeningMenu()
	{
	}

	// Token: 0x040021A7 RID: 8615
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40021A7")]
	[SerializeField]
	private CanvasGroup foreground;

	// Token: 0x040021A8 RID: 8616
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40021A8")]
	[SerializeField]
	private UILabelHandler[] handlers;

	// Token: 0x040021A9 RID: 8617
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40021A9")]
	[SerializeField]
	private bool showVideoHandler;

	// Token: 0x040021AA RID: 8618
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x40021AA")]
	[SerializeField]
	private UINavigationEffect navigationEffect;

	// Token: 0x040021AB RID: 8619
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x40021AB")]
	[SerializeField]
	private Image submissionEffect;

	// Token: 0x040021AC RID: 8620
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x40021AC")]
	[SerializeField]
	private Text copyright;

	// Token: 0x040021AD RID: 8621
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x40021AD")]
	[SerializeField]
	private Text version;

	// Token: 0x040021AE RID: 8622
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x40021AE")]
	private int currentNavigatorIndex;

	// Token: 0x040021AF RID: 8623
	[FieldOffset(Offset = "0x94")]
	[Token(Token = "0x40021AF")]
	private bool isTitleScreenEnabled;
}
