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

// Token: 0x020002A9 RID: 681
[Token(Token = "0x20002A9")]
public class UIOpeningMenu : GameCanvasBase
{
	// Token: 0x06001989 RID: 6537 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001989")]
	[Address(RVA = "0xE7D9F0", Offset = "0xE7C9F0", VA = "0x180E7D9F0", Slot = "11")]
	public override void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600198A RID: 6538 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600198A")]
	[Address(RVA = "0xE7D770", Offset = "0xE7C770", VA = "0x180E7D770", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600198B RID: 6539 RVA: 0x0003E91C File Offset: 0x0003CB1C
	[Token(Token = "0x600198B")]
	[Address(RVA = "0xE7EC80", Offset = "0xE7DC80", VA = "0x180E7EC80")]
	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: 0x0600198C RID: 6540 RVA: 0x0003E990 File Offset: 0x0003CB90
	[Token(Token = "0x600198C")]
	[Address(RVA = "0xE7E710", Offset = "0xE7D710", VA = "0x180E7E710")]
	private bool ShowVideoHandler()
	{
		return Game.Collection.gameCleared > 0;
	}

	// Token: 0x0600198D RID: 6541 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600198D")]
	[Address(RVA = "0xE7E510", Offset = "0xE7D510", VA = "0x180E7E510")]
	private UILabelHandler[] SetupHandlerNavigation()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600198E RID: 6542 RVA: 0x0003E9B4 File Offset: 0x0003CBB4
	[Token(Token = "0x600198E")]
	[Address(RVA = "0x94CB50", Offset = "0x94BB50", VA = "0x18094CB50", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		this.navigator.Move(direction);
	}

	// Token: 0x0600198F RID: 6543 RVA: 0x0003E9D4 File Offset: 0x0003CBD4
	[Token(Token = "0x600198F")]
	[Address(RVA = "0xE7E2F0", Offset = "0xE7D2F0", VA = "0x180E7E2F0")]
	public void OnSceneMenuClosed()
	{
		if (!this.isTitleScreenEnabled)
		{
			Game.GetUIStackingManager().ExecuteCommand();
			return;
		}
		string name = ((IXmlDocumentType)this).Name;
	}

	// Token: 0x06001990 RID: 6544 RVA: 0x0003EA04 File Offset: 0x0003CC04
	[Token(Token = "0x6001990")]
	[Address(RVA = "0xE7E1F0", Offset = "0xE7D1F0", VA = "0x180E7E1F0")]
	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: 0x06001991 RID: 6545 RVA: 0x0003EA70 File Offset: 0x0003CC70
	[Token(Token = "0x6001991")]
	[Address(RVA = "0x94CE70", Offset = "0x94BE70", VA = "0x18094CE70")]
	private void OnHandlerDeselected(UIHandlerBase handler)
	{
		this.navigationEffect.Hide();
	}

	// Token: 0x06001992 RID: 6546 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001992")]
	[Address(RVA = "0xE7E770", Offset = "0xE7D770", VA = "0x180E7E770", Slot = "21")]
	public override void Submit()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001993 RID: 6547 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001993")]
	[Address(RVA = "0xB0F6C0", Offset = "0xB0E6C0", VA = "0x180B0F6C0")]
	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: 0x06001994 RID: 6548 RVA: 0x0003EA90 File Offset: 0x0003CC90
	[Token(Token = "0x6001994")]
	[Address(RVA = "0x94CF90", Offset = "0x94BF90", VA = "0x18094CF90")]
	private void PerformSubmitEffect()
	{
		RectTransform rectTransform = this.submissionEffect.rectTransform;
		Vector2 anchoredPosition = this.navigator.currentHandler.rectTransform.anchoredPosition;
		rectTransform.anchoredPosition = anchoredPosition;
		this.submissionEffect.gameObject.SetActive(true);
	}

	// Token: 0x06001995 RID: 6549 RVA: 0x0003EAE0 File Offset: 0x0003CCE0
	[Token(Token = "0x6001995")]
	[Address(RVA = "0xE7EA90", Offset = "0xE7DA90", VA = "0x180E7EA90")]
	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: 0x06001996 RID: 6550 RVA: 0x0003EB64 File Offset: 0x0003CD64
	[Token(Token = "0x6001996")]
	[Address(RVA = "0xE7E380", Offset = "0xE7D380", VA = "0x180E7E380")]
	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: 0x06001997 RID: 6551 RVA: 0x0003EC04 File Offset: 0x0003CE04
	[Token(Token = "0x6001997")]
	[Address(RVA = "0xE7EBC0", Offset = "0xE7DBC0", VA = "0x180E7EBC0")]
	private void UpdateTitleScreenEnabledState(bool isEnabled)
	{
		this.isTitleScreenEnabled = isEnabled;
		if (!isEnabled)
		{
			Game.GetUIStackingManager().Record();
			return;
		}
		Game.GetUIStackingManager().Stop();
	}

	// Token: 0x06001998 RID: 6552 RVA: 0x0003EC3C File Offset: 0x0003CE3C
	[Token(Token = "0x6001998")]
	[Address(RVA = "0xE7DE70", Offset = "0xE7CE70", VA = "0x180E7DE70", 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: 0x06001999 RID: 6553 RVA: 0x0003EE14 File Offset: 0x0003D014
	[Token(Token = "0x6001999")]
	[Address(RVA = "0x94D9C0", Offset = "0x94C9C0", VA = "0x18094D9C0")]
	public UIOpeningMenu()
	{
	}

	// Token: 0x040023F7 RID: 9207
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40023F7")]
	[SerializeField]
	private CanvasGroup foreground;

	// Token: 0x040023F8 RID: 9208
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40023F8")]
	[SerializeField]
	private UILabelHandler[] handlers;

	// Token: 0x040023F9 RID: 9209
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40023F9")]
	[SerializeField]
	private bool showVideoHandler;

	// Token: 0x040023FA RID: 9210
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x40023FA")]
	[SerializeField]
	private UINavigationEffect navigationEffect;

	// Token: 0x040023FB RID: 9211
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x40023FB")]
	[SerializeField]
	private Image submissionEffect;

	// Token: 0x040023FC RID: 9212
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x40023FC")]
	[SerializeField]
	private Text copyright;

	// Token: 0x040023FD RID: 9213
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x40023FD")]
	[SerializeField]
	private Text version;

	// Token: 0x040023FE RID: 9214
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x40023FE")]
	private int currentNavigatorIndex;

	// Token: 0x040023FF RID: 9215
	[FieldOffset(Offset = "0x94")]
	[Token(Token = "0x40023FF")]
	private bool isTitleScreenEnabled;
}
