using System;
using System.Collections.Generic;
using Cpp2IlInjected;
using MarsSDK;
using MEC;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x020002A7 RID: 679
[Token(Token = "0x20002A7")]
public class UINewGameSetup : GameCanvasBase
{
	// Token: 0x06001972 RID: 6514 RVA: 0x0003E3A0 File Offset: 0x0003C5A0
	[Token(Token = "0x6001972")]
	[Address(RVA = "0xE7C6C0", Offset = "0xE7B6C0", VA = "0x180E7C6C0", Slot = "11")]
	public override void Init()
	{
		UINavigator navigator3;
		UIHandlerBase[] array5;
		UILabelHandler uilabelHandler6;
		for (;;)
		{
			UILabelHandler[] array = this.difficultyHandlers;
			int num = 0;
			UILabelHandler[] array2;
			if (num < array.Length)
			{
				array[num].index = num;
				UILabelHandler uilabelHandler = this.difficultyHandlers[num];
				Action<UIHandlerBase> action = new Action(this.OnDifficultyHandlerSelected);
				uilabelHandler.onSelectedHandler = action;
				UILabelHandler uilabelHandler2 = this.difficultyHandlers[num];
				Action<UIHandlerBase> action2 = new Action(this.OnDifficultyHandlerDeselected);
				uilabelHandler2.onDeselectedHandler = action2;
				array2 = this.difficultyHandlers;
				num++;
			}
			this.navigator.BindPointerEnterEvent(array2);
			UINavigator navigator = this.navigator;
			UILabelHandler[] array3 = this.difficultyHandlers;
			navigator.BindPointerExitEvent(array3);
			this.backHandler.index = (int)((ulong)4294967295L);
			UILabelHandler uilabelHandler3 = this.backHandler;
			Action<UIHandlerBase> action3 = new Action(this.OnBackHandlerSelected);
			uilabelHandler3.onSelectedHandler = action3;
			UILabelHandler uilabelHandler4 = this.backHandler;
			Action<UIHandlerBase> action4 = new Action(this.OnBackHandlerDeselected);
			uilabelHandler4.onDeselectedHandler = action4;
			UINavigator navigator2 = this.navigator;
			UIHandlerBase[] array4 = new UIHandlerBase[1];
			UILabelHandler uilabelHandler5 = this.backHandler;
			if (uilabelHandler5 == 0 || array4 != 0)
			{
				array4[0] = uilabelHandler5;
				navigator2.BindPointerEnterEvent(array4);
				navigator3 = this.navigator;
				array5 = new UIHandlerBase[1];
				uilabelHandler6 = this.backHandler;
				if (uilabelHandler6 == 0 || array5 != 0)
				{
					break;
				}
			}
		}
		array5[0] = uilabelHandler6;
		navigator3.BindPointerExitEvent(array5);
	}

	// Token: 0x06001973 RID: 6515 RVA: 0x0003E510 File Offset: 0x0003C710
	[Token(Token = "0x6001973")]
	[Address(RVA = "0x523370", Offset = "0x522370", VA = "0x180523370")]
	public void BindNewGameHandler(Action<GameDifficulty> newGameHandler)
	{
		/*
An exception occurred when decompiling this method (06001973)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void UINewGameSetup::BindNewGameHandler(System.Action`1<GameDifficulty>)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	stfld:class [mscorlib]System.Action`1<valuetype GameDifficulty>(UINewGameSetup::newGameHandler, ldloc:UINewGameSetup(this), ldloc:class [mscorlib]System.Action`1<valuetype GameDifficulty>(newGameHandler)); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
	}

	// Token: 0x06001974 RID: 6516 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001974")]
	[Address(RVA = "0xE7BA70", Offset = "0xE7AA70", VA = "0x180E7BA70", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001975 RID: 6517 RVA: 0x0003E524 File Offset: 0x0003C724
	[Token(Token = "0x6001975")]
	[Address(RVA = "0x94CB50", Offset = "0x94BB50", VA = "0x18094CB50", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		this.navigator.Move(direction);
	}

	// Token: 0x06001976 RID: 6518 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001976")]
	[Address(RVA = "0xE7D0E0", Offset = "0xE7C0E0", VA = "0x180E7D0E0")]
	private void OnDifficultyHandlerSelected(UIHandlerBase handler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001977 RID: 6519 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001977")]
	[Address(RVA = "0xE7D010", Offset = "0xE7C010", VA = "0x180E7D010")]
	private void OnDifficultyHandlerDeselected(UIHandlerBase handler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001978 RID: 6520 RVA: 0x0003E544 File Offset: 0x0003C744
	[Token(Token = "0x6001978")]
	[Address(RVA = "0xE7CFA0", Offset = "0xE7BFA0", VA = "0x180E7CFA0")]
	private void OnBackHandlerSelected(UIHandlerBase handler)
	{
		this.backNavigationEffect.Appear();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001979 RID: 6521 RVA: 0x0003E568 File Offset: 0x0003C768
	[Token(Token = "0x6001979")]
	[Address(RVA = "0x95C100", Offset = "0x95B100", VA = "0x18095C100")]
	private void OnBackHandlerDeselected(UIHandlerBase handler)
	{
		this.backNavigationEffect.Hide();
	}

	// Token: 0x0600197A RID: 6522 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600197A")]
	[Address(RVA = "0xE7B9B0", Offset = "0xE7A9B0", VA = "0x180E7B9B0")]
	private void AppearTip()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600197B RID: 6523 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600197B")]
	[Address(RVA = "0xE7C610", Offset = "0xE7B610", VA = "0x180E7C610")]
	private void HideTip()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600197C RID: 6524 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600197C")]
	[Address(RVA = "0xE7D280", Offset = "0xE7C280", VA = "0x180E7D280")]
	private IEnumerator<float> ProcessFading(float value)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600197D RID: 6525 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600197D")]
	[Address(RVA = "0xE7D510", Offset = "0xE7C510", VA = "0x180E7D510")]
	private void UpdateTipAlpha(float value)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600197E RID: 6526 RVA: 0x0003E588 File Offset: 0x0003C788
	[Token(Token = "0x600197E")]
	[Address(RVA = "0xE7D360", Offset = "0xE7C360", VA = "0x180E7D360", Slot = "21")]
	public override void Submit()
	{
		if (this.navigator.currentHandler)
		{
			int index = this.navigator.currentHandler.index;
			base.Close();
			int num = 0;
			Game.PlayCanvasSE(UICanvasSFX.Close);
			Action<GameDifficulty> action = this.newGameHandler;
			if (action != 0)
			{
				action(num);
			}
			Game.PlayHandlerSE(UIHandlerSFX.GamePlay);
			int num2 = 0;
			this.ForceClose(num2);
			RectTransform rectTransform = this.submissionEffect.rectTransform;
			Vector2 anchoredPosition = this.navigator.currentHandler.rectTransform.anchoredPosition;
			rectTransform.anchoredPosition = anchoredPosition;
			this.submissionEffect.gameObject.SetActive(true);
		}
	}

	// Token: 0x0600197F RID: 6527 RVA: 0x0003E630 File Offset: 0x0003C830
	[Token(Token = "0x600197F")]
	[Address(RVA = "0xE7CA90", Offset = "0xE7BA90", VA = "0x180E7CA90", Slot = "25")]
	public override void Localize(LocalizationData data)
	{
		string[] array;
		string text5;
		for (;;)
		{
			Text text = this.title;
			string text2 = data.systemText.GetText(7);
			text.text = text2;
			array = new string[4];
			string text3 = data.systemText.GetText(8);
			if (text3 == 0 || text3 != 0)
			{
				array[0] = text3;
				string text4 = data.systemText.GetText(9);
				if (text4 == 0 || text4 != 0)
				{
					array[1] = text4;
					if ("適合想挑戰極限的玩家" == 0 || "適合想挑戰極限的玩家" != 0)
					{
						array[2] = "適合想挑戰極限的玩家";
						text5 = data.systemText.GetText(1301);
						if (text5 == 0 || text5 != 0)
						{
							break;
						}
					}
				}
			}
		}
		array[3] = text5;
		this.tipText = array;
		UILabelHandler[] array2 = this.difficultyHandlers;
		GameTextData systemText = data.systemText;
		UILabelHandler uilabelHandler = array2[0];
		string text6 = systemText.GetText(27);
		uilabelHandler.SetLabel(text6);
		UILabelHandler[] array3 = this.difficultyHandlers;
		GameTextData systemText2 = data.systemText;
		UILabelHandler uilabelHandler2 = array3[1];
		string text7 = systemText2.GetText(28);
		uilabelHandler2.SetLabel(text7);
		UILabelHandler[] array4 = this.difficultyHandlers;
		GameTextData systemText3 = data.systemText;
		UILabelHandler uilabelHandler3 = array4[2];
		string text8 = systemText3.GetText(29);
		uilabelHandler3.SetLabel(text8);
		UILabelHandler[] array5 = this.difficultyHandlers;
		GameTextData systemText4 = data.systemText;
		UILabelHandler uilabelHandler4 = array5[3];
		string text9 = systemText4.GetText(1300);
		uilabelHandler4.SetLabel(text9);
		GameTextData systemText5 = data.systemText;
		UILabelHandler uilabelHandler5 = this.backHandler;
		string text10 = systemText5.GetText(12);
		uilabelHandler5.SetLabel(text10);
		GameFontPack fontPack = data.fontPack;
		Text text11 = this.title;
		Font medium = fontPack.medium;
		text11.font = medium;
		GameFontPack fontPack2 = data.fontPack;
		Text text12 = this.tip;
		Font regular = fontPack2.regular;
		text12.font = regular;
		UILabelHandler[] array6 = this.difficultyHandlers;
		int num = 0;
		int length = array6.Length;
		if (num < length)
		{
			GameFontPack fontPack3 = data.fontPack;
			Text label = array6[num].label;
			Font medium2 = fontPack3.medium;
			label.font = medium2;
			num++;
		}
		GameFontPack fontPack4 = data.fontPack;
		Text label2 = this.backHandler.label;
		Font medium3 = fontPack4.medium;
		label2.font = medium3;
	}

	// Token: 0x06001980 RID: 6528 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001980")]
	[Address(RVA = "0x29A960", Offset = "0x299960", VA = "0x18029A960")]
	private bool ShowHardButton()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001981 RID: 6529 RVA: 0x0003E884 File Offset: 0x0003CA84
	[Token(Token = "0x6001981")]
	[Address(RVA = "0xE7D300", Offset = "0xE7C300", VA = "0x180E7D300")]
	private bool ShowBossRushButton()
	{
		return Game.Collection.gameCleared > 0;
	}

	// Token: 0x06001982 RID: 6530 RVA: 0x0003E8A8 File Offset: 0x0003CAA8
	[Token(Token = "0x6001982")]
	[Address(RVA = "0x94D9C0", Offset = "0x94C9C0", VA = "0x18094D9C0")]
	public UINewGameSetup()
	{
	}

	// Token: 0x040023E6 RID: 9190
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40023E6")]
	[SerializeField]
	private Text title;

	// Token: 0x040023E7 RID: 9191
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40023E7")]
	[SerializeField]
	private Text tip;

	// Token: 0x040023E8 RID: 9192
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40023E8")]
	[SerializeField]
	private UILabelHandler[] difficultyHandlers;

	// Token: 0x040023E9 RID: 9193
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x40023E9")]
	[SerializeField]
	private UILabelHandler backHandler;

	// Token: 0x040023EA RID: 9194
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x40023EA")]
	[SerializeField]
	private UINavigationEffect difficultyNavigationEffect;

	// Token: 0x040023EB RID: 9195
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x40023EB")]
	[SerializeField]
	private UINavigationEffect backNavigationEffect;

	// Token: 0x040023EC RID: 9196
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x40023EC")]
	[SerializeField]
	private Image submissionEffect;

	// Token: 0x040023ED RID: 9197
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x40023ED")]
	private CoroutineHandle tipProcessor;

	// Token: 0x040023EE RID: 9198
	[FieldOffset(Offset = "0x94")]
	[Token(Token = "0x40023EE")]
	private float alpha;

	// Token: 0x040023EF RID: 9199
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x40023EF")]
	private string[] tipText;

	// Token: 0x040023F0 RID: 9200
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x40023F0")]
	private Action<GameDifficulty> newGameHandler;

	// Token: 0x040023F1 RID: 9201
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x40023F1")]
	private bool showHardeButton;

	// Token: 0x040023F2 RID: 9202
	[FieldOffset(Offset = "0xA9")]
	[Token(Token = "0x40023F2")]
	private bool showBossRushButton;
}
