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

// Token: 0x0200029A RID: 666
[Token(Token = "0x200029A")]
public class UITeleport : GameCanvasBase
{
	// Token: 0x06001900 RID: 6400 RVA: 0x0003C50C File Offset: 0x0003A70C
	[Token(Token = "0x6001900")]
	[Address(RVA = "0x965720", Offset = "0x964720", VA = "0x180965720", Slot = "11")]
	public override void Init()
	{
		this.InitTopHandlers();
		this.InitFirstNavigation();
		this.InitLastNavigation();
		this.InitSelection();
	}

	// Token: 0x06001901 RID: 6401 RVA: 0x0003C534 File Offset: 0x0003A734
	[Token(Token = "0x6001901")]
	[Address(RVA = "0x965120", Offset = "0x964120", VA = "0x180965120")]
	private void InitTopHandlers()
	{
		do
		{
			UITeleportHandler uiteleportHandler = this.firstAreaHandlers[0];
			int num = 0;
			uiteleportHandler.Init(GameStage.Act02_01, num);
			this.firstAreaHandlers[1].Init(GameStage.Act02_01, 3);
			this.firstAreaHandlers[2].Init(GameStage.Act02_01, 1);
			this.firstAreaHandlers[3].Init(GameStage.Act02_01, 4);
			UITeleportHandler uiteleportHandler2 = this.firstAreaHandlers[4];
			int num2 = 0;
			uiteleportHandler2.Init(GameStage.Act03_01, num2);
			this.firstAreaHandlers[5].Init(GameStage.Act03_01, 1);
			UITeleportHandler uiteleportHandler3 = this.firstAreaHandlers[6];
			int num3 = 0;
			uiteleportHandler3.Init(GameStage.Act04_01, num3);
			this.firstAreaHandlers[7].Init(GameStage.Act04_01, 1);
			UITeleportHandler uiteleportHandler4 = this.firstAreaHandlers[8];
			int num4 = 0;
			uiteleportHandler4.Init(GameStage.Act05_02, num4);
			this.firstAreaHandlers[9].Init(GameStage.Act05_02, 1);
			this.firstAreaHandlers[10].Init(GameStage.Act05_02, 6);
			this.firstAreaHandlers[11].Init(GameStage.Act05_02, 2);
			UITeleportHandler uiteleportHandler5 = this.lastAreaHandlers[0];
			int num5 = 0;
			uiteleportHandler5.Init(GameStage.Act06_03, num5);
			this.lastAreaHandlers[1].Init(GameStage.Act06_03, 1);
			this.lastAreaHandlers[2].Init(GameStage.Act06_03, 2);
			this.lastAreaHandlers[3].Init(GameStage.Act06_03, 3);
			UITeleportHandler uiteleportHandler6 = this.lastAreaHandlers[4];
			int num6 = 0;
			uiteleportHandler6.Init(GameStage.Act07, num6);
			this.lastAreaHandlers[5].Init(GameStage.Act07, 1);
			this.lastAreaHandlers[6].Init(GameStage.Act07, 2);
			UITeleportHandler[] array = this.firstAreaHandlers;
			int num7 = 0;
			if (num7 < array.Length)
			{
				array[num7].index = num7;
				num7++;
				UITeleportHandler[] array2 = this.firstAreaHandlers;
			}
			UITeleportHandler[] array3 = this.lastAreaHandlers;
			if (num7 >= array3.Length)
			{
				break;
			}
			UITeleportHandler uiteleportHandler7 = array3[num7];
			num7++;
			uiteleportHandler7.index = 100;
		}
		while (this.lastAreaHandlers != 0);
	}

	// Token: 0x06001902 RID: 6402 RVA: 0x0003C748 File Offset: 0x0003A948
	[Token(Token = "0x6001902")]
	[Address(RVA = "0x9632A0", Offset = "0x9622A0", VA = "0x1809632A0")]
	private void InitFirstNavigation()
	{
		UINavigationSetter uinavigationSetter6;
		UIHandlerBase[] array6;
		UILabelHandler uilabelHandler2;
		for (;;)
		{
			int num = 0;
			UINavigationSetter uinavigationSetter = UINavigationSetter.Get(UINavigationMode.Horizontal, true, num);
			UIHandlerBase[] array = new UIHandlerBase[4];
			UITeleportHandler uiteleportHandler = this.firstAreaHandlers[0];
			if (uiteleportHandler == 0 || array != 0)
			{
				array[0] = uiteleportHandler;
				UITeleportHandler uiteleportHandler2 = this.firstAreaHandlers[1];
				if (uiteleportHandler2 == 0 || array != 0)
				{
					array[1] = uiteleportHandler2;
					UITeleportHandler uiteleportHandler3 = this.firstAreaHandlers[2];
					if (uiteleportHandler3 == 0 || array != 0)
					{
						array[2] = uiteleportHandler3;
						UITeleportHandler uiteleportHandler4 = this.firstAreaHandlers[3];
						if (uiteleportHandler4 == 0 || array != 0)
						{
							array[3] = uiteleportHandler4;
							uinavigationSetter.Apply(array);
							int num2 = 0;
							UINavigationSetter uinavigationSetter2 = UINavigationSetter.Get(UINavigationMode.Horizontal, true, num2);
							UIHandlerBase[] array2 = new UIHandlerBase[2];
							UITeleportHandler uiteleportHandler5 = this.firstAreaHandlers[4];
							if (uiteleportHandler5 == 0 || array2 != 0)
							{
								array2[0] = uiteleportHandler5;
								UITeleportHandler uiteleportHandler6 = this.firstAreaHandlers[5];
								if (uiteleportHandler6 == 0 || array2 != 0)
								{
									array2[1] = uiteleportHandler6;
									uinavigationSetter2.Apply(array2);
									int num3 = 0;
									UINavigationSetter uinavigationSetter3 = UINavigationSetter.Get(UINavigationMode.Horizontal, true, num3);
									UIHandlerBase[] array3 = new UIHandlerBase[2];
									UITeleportHandler uiteleportHandler7 = this.firstAreaHandlers[6];
									if (uiteleportHandler7 == 0 || array3 != 0)
									{
										array3[0] = uiteleportHandler7;
										UITeleportHandler uiteleportHandler8 = this.firstAreaHandlers[7];
										if (uiteleportHandler8 == 0 || array3 != 0)
										{
											array3[1] = uiteleportHandler8;
											uinavigationSetter3.Apply(array3);
											int num4 = 0;
											UINavigationSetter uinavigationSetter4 = UINavigationSetter.Get(UINavigationMode.Horizontal, true, num4);
											UIHandlerBase[] array4 = new UIHandlerBase[4];
											UITeleportHandler uiteleportHandler9 = this.firstAreaHandlers[8];
											if (uiteleportHandler9 == 0 || array4 != 0)
											{
												array4[0] = uiteleportHandler9;
												UITeleportHandler uiteleportHandler10 = this.firstAreaHandlers[9];
												if (uiteleportHandler10 == 0 || array4 != 0)
												{
													array4[1] = uiteleportHandler10;
													UITeleportHandler uiteleportHandler11 = this.firstAreaHandlers[10];
													if (uiteleportHandler11 == 0 || array4 != 0)
													{
														array4[2] = uiteleportHandler11;
														UITeleportHandler uiteleportHandler12 = this.firstAreaHandlers[11];
														if (uiteleportHandler12 == 0 || array4 != 0)
														{
															array4[3] = uiteleportHandler12;
															uinavigationSetter4.Apply(array4);
															int num5 = 0;
															UINavigationSetter uinavigationSetter5 = UINavigationSetter.Get(UINavigationMode.Vertical, true, num5);
															UIHandlerBase[] array5 = new UIHandlerBase[5];
															UITeleportHandler uiteleportHandler13 = this.firstAreaHandlers[0];
															if (uiteleportHandler13 == 0 || array5 != 0)
															{
																array5[0] = uiteleportHandler13;
																UITeleportHandler uiteleportHandler14 = this.firstAreaHandlers[4];
																if (uiteleportHandler14 == 0 || array5 != 0)
																{
																	array5[1] = uiteleportHandler14;
																	UITeleportHandler uiteleportHandler15 = this.firstAreaHandlers[6];
																	if (uiteleportHandler15 == 0 || array5 != 0)
																	{
																		array5[2] = uiteleportHandler15;
																		UITeleportHandler uiteleportHandler16 = this.firstAreaHandlers[8];
																		if (uiteleportHandler16 == 0 || array5 != 0)
																		{
																			array5[3] = uiteleportHandler16;
																			UILabelHandler uilabelHandler = this.backHandler;
																			if (uilabelHandler == 0 || array5 != 0)
																			{
																				array5[4] = uilabelHandler;
																				uinavigationSetter5.Apply(array5);
																				int num6 = 0;
																				uinavigationSetter6 = UINavigationSetter.Get(UINavigationMode.Vertical, true, num6);
																				array6 = new UIHandlerBase[5];
																				UITeleportHandler uiteleportHandler17 = this.firstAreaHandlers[1];
																				if (uiteleportHandler17 == 0 || array6 != 0)
																				{
																					array6[0] = uiteleportHandler17;
																					UITeleportHandler uiteleportHandler18 = this.firstAreaHandlers[5];
																					if (uiteleportHandler18 == 0 || array6 != 0)
																					{
																						array6[1] = uiteleportHandler18;
																						UITeleportHandler uiteleportHandler19 = this.firstAreaHandlers[7];
																						if (uiteleportHandler19 == 0 || array6 != 0)
																						{
																							array6[2] = uiteleportHandler19;
																							UITeleportHandler uiteleportHandler20 = this.firstAreaHandlers[9];
																							if (uiteleportHandler20 == 0 || array6 != 0)
																							{
																								array6[3] = uiteleportHandler20;
																								uilabelHandler2 = this.backHandler;
																								if (uilabelHandler2 == 0 || array6 != 0)
																								{
																									break;
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		array6[4] = uilabelHandler2;
		uinavigationSetter6.Apply(array6);
		UITeleportHandler uiteleportHandler21 = this.firstAreaHandlers[2];
		UILabelHandler uilabelHandler3 = this.backHandler;
		uiteleportHandler21.SetupNavigationHandler(Direction2D.Up, uilabelHandler3);
		UITeleportHandler[] array7 = this.firstAreaHandlers;
		int length = array7.Length;
		UITeleportHandler uiteleportHandler22 = array7[2];
		UITeleportHandler uiteleportHandler23 = array7[5];
		uiteleportHandler22.SetupNavigationHandler(Direction2D.Down, uiteleportHandler23);
		UITeleportHandler uiteleportHandler24 = this.firstAreaHandlers[3];
		UILabelHandler uilabelHandler4 = this.backHandler;
		uiteleportHandler24.SetupNavigationHandler(Direction2D.Up, uilabelHandler4);
		UITeleportHandler[] array8 = this.firstAreaHandlers;
		int length2 = array8.Length;
		UITeleportHandler uiteleportHandler25 = array8[3];
		UITeleportHandler uiteleportHandler26 = array8[5];
		uiteleportHandler25.SetupNavigationHandler(Direction2D.Down, uiteleportHandler26);
		UITeleportHandler[] array9 = this.firstAreaHandlers;
		UITeleportHandler uiteleportHandler27 = array9[10];
		UITeleportHandler uiteleportHandler28 = array9[7];
		uiteleportHandler27.SetupNavigationHandler(Direction2D.Up, uiteleportHandler28);
		UITeleportHandler uiteleportHandler29 = this.firstAreaHandlers[10];
		UILabelHandler uilabelHandler5 = this.backHandler;
		uiteleportHandler29.SetupNavigationHandler(Direction2D.Down, uilabelHandler5);
		UITeleportHandler[] array10 = this.firstAreaHandlers;
		UITeleportHandler uiteleportHandler30 = array10[11];
		UITeleportHandler uiteleportHandler31 = array10[7];
		uiteleportHandler30.SetupNavigationHandler(Direction2D.Up, uiteleportHandler31);
		UITeleportHandler uiteleportHandler32 = this.firstAreaHandlers[11];
		UILabelHandler uilabelHandler6 = this.backHandler;
		uiteleportHandler32.SetupNavigationHandler(Direction2D.Down, uilabelHandler6);
	}

	// Token: 0x06001903 RID: 6403 RVA: 0x0003CC50 File Offset: 0x0003AE50
	[Token(Token = "0x6001903")]
	[Address(RVA = "0x9641C0", Offset = "0x9631C0", VA = "0x1809641C0")]
	private void InitLastNavigation()
	{
		UINavigationSetter uinavigationSetter6;
		UIHandlerBase[] array7;
		UILabelHandler uilabelHandler6;
		for (;;)
		{
			int num = 0;
			UINavigationSetter uinavigationSetter = UINavigationSetter.Get(UINavigationMode.Horizontal, true, num);
			UIHandlerBase[] array = new UIHandlerBase[4];
			UITeleportHandler uiteleportHandler = this.lastAreaHandlers[0];
			if (uiteleportHandler == 0 || array != 0)
			{
				array[0] = uiteleportHandler;
				UITeleportHandler uiteleportHandler2 = this.lastAreaHandlers[1];
				if (uiteleportHandler2 == 0 || array != 0)
				{
					array[1] = uiteleportHandler2;
					UITeleportHandler uiteleportHandler3 = this.lastAreaHandlers[2];
					if (uiteleportHandler3 == 0 || array != 0)
					{
						array[2] = uiteleportHandler3;
						UITeleportHandler uiteleportHandler4 = this.lastAreaHandlers[3];
						if (uiteleportHandler4 == 0 || array != 0)
						{
							array[3] = uiteleportHandler4;
							uinavigationSetter.Apply(array);
							int num2 = 0;
							UINavigationSetter uinavigationSetter2 = UINavigationSetter.Get(UINavigationMode.Horizontal, true, num2);
							UIHandlerBase[] array2 = new UIHandlerBase[3];
							UITeleportHandler uiteleportHandler5 = this.lastAreaHandlers[4];
							if (uiteleportHandler5 == 0 || array2 != 0)
							{
								array2[0] = uiteleportHandler5;
								UITeleportHandler uiteleportHandler6 = this.lastAreaHandlers[5];
								if (uiteleportHandler6 == 0 || array2 != 0)
								{
									array2[1] = uiteleportHandler6;
									UITeleportHandler uiteleportHandler7 = this.lastAreaHandlers[6];
									if (uiteleportHandler7 == 0 || array2 != 0)
									{
										array2[2] = uiteleportHandler7;
										uinavigationSetter2.Apply(array2);
										int num3 = 0;
										UINavigationSetter uinavigationSetter3 = UINavigationSetter.Get(UINavigationMode.Vertical, true, num3);
										UIHandlerBase[] array3 = new UIHandlerBase[3];
										UITeleportHandler uiteleportHandler8 = this.lastAreaHandlers[0];
										if (uiteleportHandler8 == 0 || array3 != 0)
										{
											array3[0] = uiteleportHandler8;
											UITeleportHandler uiteleportHandler9 = this.lastAreaHandlers[4];
											if (uiteleportHandler9 == 0 || array3 != 0)
											{
												array3[1] = uiteleportHandler9;
												UILabelHandler uilabelHandler = this.backHandler;
												if (uilabelHandler == 0 || array3 != 0)
												{
													array3[2] = uilabelHandler;
													uinavigationSetter3.Apply(array3);
													int num4 = 0;
													UINavigationSetter uinavigationSetter4 = UINavigationSetter.Get(UINavigationMode.Vertical, true, num4);
													UIHandlerBase[] array4 = new UIHandlerBase[3];
													UITeleportHandler uiteleportHandler10 = this.lastAreaHandlers[1];
													if (uiteleportHandler10 == 0 || array4 != 0)
													{
														array4[0] = uiteleportHandler10;
														UITeleportHandler uiteleportHandler11 = this.lastAreaHandlers[5];
														if (uiteleportHandler11 == 0 || array4 != 0)
														{
															array4[1] = uiteleportHandler11;
															UILabelHandler uilabelHandler2 = this.backHandler;
															if (uilabelHandler2 == 0 || array4 != 0)
															{
																array4[2] = uilabelHandler2;
																uinavigationSetter4.Apply(array4);
																int num5 = 0;
																UINavigationSetter uinavigationSetter5 = UINavigationSetter.Get(UINavigationMode.Vertical, true, num5);
																UIHandlerBase[] array5 = new UIHandlerBase[3];
																UITeleportHandler uiteleportHandler12 = this.lastAreaHandlers[2];
																if (uiteleportHandler12 == 0 || array5 != 0)
																{
																	array5[0] = uiteleportHandler12;
																	UITeleportHandler uiteleportHandler13 = this.lastAreaHandlers[6];
																	if (uiteleportHandler13 == 0 || array5 != 0)
																	{
																		array5[1] = uiteleportHandler13;
																		UILabelHandler uilabelHandler3 = this.backHandler;
																		if (uilabelHandler3 == 0 || array5 != 0)
																		{
																			array5[2] = uilabelHandler3;
																			uinavigationSetter5.Apply(array5);
																			UITeleportHandler uiteleportHandler14 = this.lastAreaHandlers[3];
																			UILabelHandler uilabelHandler4 = this.backHandler;
																			uiteleportHandler14.SetupNavigationHandler(Direction2D.Up, uilabelHandler4);
																			UITeleportHandler[] array6 = this.lastAreaHandlers;
																			int length = array6.Length;
																			UITeleportHandler uiteleportHandler15 = array6[3];
																			UITeleportHandler uiteleportHandler16 = array6[6];
																			uiteleportHandler15.SetupNavigationHandler(Direction2D.Down, uiteleportHandler16);
																			int num6 = 0;
																			uinavigationSetter6 = UINavigationSetter.Get(UINavigationMode.Horizontal, true, num6);
																			array7 = new UIHandlerBase[2];
																			UILabelHandler uilabelHandler5 = this.backHandler;
																			if (uilabelHandler5 == 0 || array7 != 0)
																			{
																				array7[0] = uilabelHandler5;
																				uilabelHandler6 = this.closeHandler;
																				if (uilabelHandler6 == 0 || array7 != 0)
																				{
																					break;
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		array7[1] = uilabelHandler6;
		uinavigationSetter6.Apply(array7);
	}

	// Token: 0x06001904 RID: 6404 RVA: 0x0003CFD0 File Offset: 0x0003B1D0
	[Token(Token = "0x6001904")]
	[Address(RVA = "0x964CC0", Offset = "0x963CC0", VA = "0x180964CC0")]
	private void InitSelection()
	{
		UITeleportHandler[] array = this.firstAreaHandlers;
		int num = 0;
		int length = array.Length;
		if (num < length)
		{
			UITeleportHandler uiteleportHandler = array[num];
			Action<UIHandlerBase> action = new Action(this.OnTopHandlerSelected);
			uiteleportHandler.onSelectedHandler = action;
			Action<UIHandlerBase> action2 = new Action(this.OnTopHandlerDeselected);
			uiteleportHandler.onDeselectedHandler = action2;
			num++;
		}
		UITeleportHandler[] array2 = this.lastAreaHandlers;
		int length2 = array2.Length;
		if (num < length2)
		{
			UITeleportHandler uiteleportHandler2 = array2[num];
			Action<UIHandlerBase> action3 = new Action(this.OnTopHandlerSelected);
			uiteleportHandler2.onSelectedHandler = action3;
			Action<UIHandlerBase> action4 = new Action(this.OnTopHandlerDeselected);
			uiteleportHandler2.onDeselectedHandler = action4;
			num++;
		}
		this.backHandler.index = (int)((ulong)900L);
		this.closeHandler.index = (int)((ulong)901L);
		UILabelHandler uilabelHandler = this.backHandler;
		Action<UIHandlerBase> action5 = new Action(this.OnBottomHandlerSelected);
		uilabelHandler.onSelectedHandler = action5;
		UILabelHandler uilabelHandler2 = this.backHandler;
		Action<UIHandlerBase> action6 = new Action(this.OnBottomHandlerDeselected);
		uilabelHandler2.onDeselectedHandler = action6;
		UILabelHandler uilabelHandler3 = this.closeHandler;
		Action<UIHandlerBase> action7 = new Action(this.OnBottomHandlerSelected);
		uilabelHandler3.onSelectedHandler = action7;
		UILabelHandler uilabelHandler4 = this.closeHandler;
		Action<UIHandlerBase> action8 = new Action(this.OnBottomHandlerDeselected);
		uilabelHandler4.onDeselectedHandler = action8;
		List<UIHandlerBase> list = new List();
		UITeleportHandler[] array3 = this.firstAreaHandlers;
		list.AddRange(array3);
		UITeleportHandler[] array4 = this.lastAreaHandlers;
		list.AddRange(array4);
		UILabelHandler uilabelHandler5 = this.backHandler;
		list.Add(uilabelHandler5);
		UILabelHandler uilabelHandler6 = this.closeHandler;
		list.Add(uilabelHandler6);
		UIHandlerBase[] array5 = list.ToArray();
		this.navigator.BindPointerEnterEvent(array5);
		this.navigator.BindPointerExitEvent(array5);
	}

	// Token: 0x06001905 RID: 6405 RVA: 0x0003D190 File Offset: 0x0003B390
	[Token(Token = "0x6001905")]
	[Address(RVA = "0x966540", Offset = "0x965540", VA = "0x180966540")]
	public void UpdateLocation(GameStage stage, int savePoint)
	{
		this.currentStage = stage;
		this.currentSavePoint = savePoint;
	}

	// Token: 0x06001906 RID: 6406 RVA: 0x0003D1AC File Offset: 0x0003B3AC
	[Token(Token = "0x6001906")]
	[Address(RVA = "0x962A90", Offset = "0x961A90", VA = "0x180962A90", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		GameObject gameObject = this.bottomSubmissionEffect.gameObject;
		int num = 0;
		gameObject.SetActive(num != 0);
		this.bottomNavigationEffect.HideImmediate();
		UITeleportHandler[] array = this.firstAreaHandlers;
		int num2 = 0;
		int length = array.Length;
		if (num2 < length)
		{
			array[num2].UpdateUnlockState();
			num2++;
		}
		UITeleportHandler[] array2 = this.lastAreaHandlers;
		int length2 = array2.Length;
		if (num2 < length2)
		{
			array2[num2].UpdateUnlockState();
			num2++;
		}
		GameStage stage = Game.GameSave.basic.stage;
		if (stage == GameStage.Act06_03)
		{
		}
		bool flag = stage != GameStage.Act07;
		this.topHandlerGroups[0].gameObject.SetActive(flag);
		this.topHandlerGroups[1].gameObject.SetActive(flag);
		this.topHandlerGroups[2].gameObject.SetActive(flag);
		this.topHandlerGroups[3].gameObject.SetActive(flag);
		this.topHandlerGroups[4].gameObject.SetActive(flag);
		this.topHandlerGroups[5].gameObject.SetActive(flag);
		UINavigator navigator = this.navigator;
		UILabelHandler uilabelHandler4;
		if (!flag)
		{
			UITeleportHandler[] array3 = this.lastAreaHandlers;
			int length3 = array3.Length;
			if (num2 < length3)
			{
				UITeleportHandler uiteleportHandler = array3[num2];
				int num3 = this.currentSavePoint;
				GameStage gameStage = this.currentStage;
				if (uiteleportHandler.IsCurrentLocation(gameStage, num3))
				{
					goto IL_17C;
				}
				num2++;
			}
			UITeleportHandler uiteleportHandler2 = array3[0];
			IL_17C:
			navigator.SetDefaultHandler(uiteleportHandler2);
			UITeleportHandler[] array4 = this.lastAreaHandlers;
			UILabelHandler uilabelHandler = this.backHandler;
			UITeleportHandler uiteleportHandler3 = array4[4];
			uilabelHandler.SetupNavigationHandler(Direction2D.Up, uiteleportHandler3);
			UITeleportHandler[] array5 = this.lastAreaHandlers;
			UILabelHandler uilabelHandler2 = this.backHandler;
			UITeleportHandler uiteleportHandler4 = array5[0];
			uilabelHandler2.SetupNavigationHandler(Direction2D.Down, uiteleportHandler4);
			UITeleportHandler[] array6 = this.lastAreaHandlers;
			UILabelHandler uilabelHandler3 = this.closeHandler;
			UITeleportHandler uiteleportHandler5 = array6[4];
			uilabelHandler3.SetupNavigationHandler(Direction2D.Up, uiteleportHandler5);
			UITeleportHandler[] array7 = this.lastAreaHandlers;
			uilabelHandler4 = this.closeHandler;
		}
		UITeleportHandler[] array8 = this.firstAreaHandlers;
		int length4 = array8.Length;
		if (uilabelHandler4 < length4)
		{
			UITeleportHandler uiteleportHandler6 = array8[num2];
			int num4 = this.currentSavePoint;
			GameStage gameStage2 = this.currentStage;
			if (uiteleportHandler6.IsCurrentLocation(gameStage2, num4))
			{
				goto IL_24E;
			}
			num2++;
		}
		UITeleportHandler uiteleportHandler7 = array8[0];
		IL_24E:
		navigator.SetDefaultHandler(uiteleportHandler7);
		UITeleportHandler[] array9 = this.firstAreaHandlers;
		UILabelHandler uilabelHandler5 = this.backHandler;
		UITeleportHandler uiteleportHandler8 = array9[8];
		uilabelHandler5.SetupNavigationHandler(Direction2D.Up, uiteleportHandler8);
		UITeleportHandler[] array10 = this.firstAreaHandlers;
		UILabelHandler uilabelHandler6 = this.backHandler;
		UITeleportHandler uiteleportHandler9 = array10[0];
		uilabelHandler6.SetupNavigationHandler(Direction2D.Down, uiteleportHandler9);
		UITeleportHandler[] array11 = this.firstAreaHandlers;
		UILabelHandler uilabelHandler7 = this.closeHandler;
		UITeleportHandler uiteleportHandler10 = array11[8];
		uilabelHandler7.SetupNavigationHandler(Direction2D.Up, uiteleportHandler10);
		UITeleportHandler[] array12 = this.firstAreaHandlers;
		UILabelHandler uilabelHandler8 = this.closeHandler;
		UITeleportHandler uiteleportHandler11 = array12[0];
		uilabelHandler8.SetupNavigationHandler(Direction2D.Down, uiteleportHandler11);
		base.Appear(completeHandler);
	}

	// Token: 0x06001907 RID: 6407 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001907")]
	[Address(RVA = "0x9659F0", Offset = "0x9649F0", VA = "0x1809659F0")]
	private bool OnFirstAreas()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001908 RID: 6408 RVA: 0x0003D4B0 File Offset: 0x0003B6B0
	[Token(Token = "0x6001908")]
	[Address(RVA = "0x963180", Offset = "0x962180", VA = "0x180963180")]
	private UITeleportHandler GetCurrentLocationHandler(UITeleportHandler[] source)
	{
		int num = 0;
		int length = source.Length;
		if (num < length)
		{
			UITeleportHandler uiteleportHandler = source[num];
			int num2 = this.currentSavePoint;
			GameStage gameStage = this.currentStage;
			if (!uiteleportHandler.IsCurrentLocation(gameStage, num2))
			{
				num++;
			}
			return uiteleportHandler;
		}
		throw new NullReferenceException();
	}

	// Token: 0x06001909 RID: 6409 RVA: 0x0003D4F8 File Offset: 0x0003B6F8
	[Token(Token = "0x6001909")]
	[Address(RVA = "0x94CB50", Offset = "0x94BB50", VA = "0x18094CB50", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		this.navigator.Move(direction);
	}

	// Token: 0x0600190A RID: 6410 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600190A")]
	[Address(RVA = "0x965AD0", Offset = "0x964AD0", VA = "0x180965AD0")]
	private void OnTopHandlerSelected(UIHandlerBase handler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600190B RID: 6411 RVA: 0x0003D518 File Offset: 0x0003B718
	[Token(Token = "0x600190B")]
	[Address(RVA = "0x965A70", Offset = "0x964A70", VA = "0x180965A70")]
	private void OnTopHandlerDeselected(UIHandlerBase handler)
	{
		this.location.text = "";
		this.topNavigationEffect.Hide();
	}

	// Token: 0x0600190C RID: 6412 RVA: 0x0003D548 File Offset: 0x0003B748
	[Token(Token = "0x600190C")]
	[Address(RVA = "0x965900", Offset = "0x964900", VA = "0x180965900")]
	private void OnBottomHandlerSelected(UIHandlerBase handler)
	{
		UINavigationEffect uinavigationEffect = this.bottomNavigationEffect;
		Vector2 anchoredPosition = handler.rectTransform.anchoredPosition;
		uinavigationEffect.UpdatePos(anchoredPosition);
		UINavigationEffect uinavigationEffect2 = this.bottomNavigationEffect;
		if (handler.index != 900)
		{
		}
		UILabelHandler uilabelHandler = this.backHandler;
		uinavigationEffect2.UpdateArrowPos(uilabelHandler);
		this.bottomNavigationEffect.Appear();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x0600190D RID: 6413 RVA: 0x0003D5A8 File Offset: 0x0003B7A8
	[Token(Token = "0x600190D")]
	[Address(RVA = "0x9658D0", Offset = "0x9648D0", VA = "0x1809658D0")]
	private void OnBottomHandlerDeselected(UIHandlerBase handler)
	{
		this.bottomNavigationEffect.Hide();
	}

	// Token: 0x0600190E RID: 6414 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600190E")]
	[Address(RVA = "0x966270", Offset = "0x965270", VA = "0x180966270", Slot = "21")]
	public override void Submit()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600190F RID: 6415 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600190F")]
	[Address(RVA = "0x965C30", Offset = "0x964C30", VA = "0x180965C30")]
	private void PerformBottomSubmissionEffect()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001910 RID: 6416 RVA: 0x0003D5C8 File Offset: 0x0003B7C8
	[Token(Token = "0x6001910")]
	[Address(RVA = "0x965D10", Offset = "0x964D10", VA = "0x180965D10")]
	private void ShowTeleportMessageBox(UITeleportHandler handler)
	{
		MessageBoxConfig messageBoxConfig;
		MessageBoxHandlerData[] array;
		MessageBoxHandlerData messageBoxHandlerData2;
		for (;;)
		{
			if (!handler.hasUnlocked)
			{
				return;
			}
			GameStage stage = handler.stage;
			this.handlerStage = stage;
			int savePoint = handler.savePoint;
			this.handlerSavePoint = savePoint;
			UIMessageBox messageBox2 = Game.GetMessageBox(MessageBoxStyle.Universal);
			UIMessageBox messageBox = messageBox2;
			string text = Game.<UISystemText>k__BackingField.GetText(39);
			string text2 = this.location.text;
			messageBoxConfig = new MessageBoxConfig(text.Replace("#", text2), 1);
			array = new MessageBoxHandlerData[2];
			string text3 = Game.<UISystemText>k__BackingField.GetText(13);
			Action action = delegate
			{
				messageBox.ClearCloseEvent();
				messageBox.Close();
				this.Teleport();
			};
			UIHandlerSFX uihandlerSFX;
			MessageBoxHandlerData messageBoxHandlerData = new MessageBoxHandlerData(text3, uihandlerSFX, action);
			if (messageBoxHandlerData == 0 || messageBoxHandlerData != 0)
			{
				array[0] = messageBoxHandlerData;
				string text4 = Game.<UISystemText>k__BackingField.GetText(14);
				Action action2 = new Action(messageBox.Close);
				UICanvasSFX uicanvasSFX;
				messageBoxHandlerData2 = new MessageBoxHandlerData(text4, uicanvasSFX, action2);
				if (messageBoxHandlerData2 == 0 || messageBoxHandlerData2 != 0)
				{
					break;
				}
			}
		}
		array[1] = messageBoxHandlerData2;
		MessageBoxConfig messageBoxConfig2 = messageBoxConfig.BindHandlerData(array);
		Action action3 = delegate
		{
			CS$<>8__locals1.<>4__this.SimpleAppear();
			Game.BindUIController(CS$<>8__locals1.<>4__this);
		};
		MessageBoxConfig messageBoxConfig3 = messageBoxConfig2.BindCloseEvent(action3);
		base.SimpleHide();
		Game.UnbindUIController();
		CS$<>8__locals1.messageBox.OpenMsgBox(messageBoxConfig3);
	}

	// Token: 0x06001911 RID: 6417 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001911")]
	[Address(RVA = "0x9663C0", Offset = "0x9653C0", VA = "0x1809663C0")]
	private void Teleport()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001912 RID: 6418 RVA: 0x0003D71C File Offset: 0x0003B91C
	[Token(Token = "0x6001912")]
	[Address(RVA = "0x965760", Offset = "0x964760", VA = "0x180965760", Slot = "25")]
	public override void Localize(LocalizationData data)
	{
		Text text = this.title;
		string text2 = data.systemText.GetText(178);
		text.text = text2;
		GameTextData systemText = data.systemText;
		UILabelHandler uilabelHandler = this.backHandler;
		string text3 = systemText.GetText(12);
		uilabelHandler.SetLabel(text3);
		GameTextData systemText2 = data.systemText;
		UILabelHandler uilabelHandler2 = this.closeHandler;
		string text4 = systemText2.GetText(183);
		uilabelHandler2.SetLabel(text4);
		GameFontPack fontPack = data.fontPack;
		Text text5 = this.title;
		Font light = fontPack.light;
		text5.font = light;
		GameFontPack fontPack2 = data.fontPack;
		Text text6 = this.location;
		Font light2 = fontPack2.light;
		text6.font = light2;
		GameFontPack fontPack3 = data.fontPack;
		UILabelHandler uilabelHandler3 = this.backHandler;
		Font medium = fontPack3.medium;
		uilabelHandler3.SetFont(medium);
		GameFontPack fontPack4 = data.fontPack;
		UILabelHandler uilabelHandler4 = this.closeHandler;
		Font medium2 = fontPack4.medium;
		uilabelHandler4.SetFont(medium2);
	}

	// Token: 0x06001913 RID: 6419 RVA: 0x0003D820 File Offset: 0x0003BA20
	[Token(Token = "0x6001913")]
	[Address(RVA = "0x963230", Offset = "0x962230", VA = "0x180963230")]
	private UITeleportHandler GetTeleportHandler(int index)
	{
		if (index < 100)
		{
			return this.firstAreaHandlers[index];
		}
		UITeleportHandler[] array = this.lastAreaHandlers;
		throw new NullReferenceException();
	}

	// Token: 0x06001914 RID: 6420 RVA: 0x0003D84C File Offset: 0x0003BA4C
	[Token(Token = "0x6001914")]
	[Address(RVA = "0x94D9C0", Offset = "0x94C9C0", VA = "0x18094D9C0")]
	public UITeleport()
	{
	}

	// Token: 0x040023A3 RID: 9123
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40023A3")]
	[SerializeField]
	private Text title;

	// Token: 0x040023A4 RID: 9124
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40023A4")]
	[SerializeField]
	private Text location;

	// Token: 0x040023A5 RID: 9125
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40023A5")]
	[SerializeField]
	private UITeleportHandler[] firstAreaHandlers;

	// Token: 0x040023A6 RID: 9126
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x40023A6")]
	[SerializeField]
	private UITeleportHandler[] lastAreaHandlers;

	// Token: 0x040023A7 RID: 9127
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x40023A7")]
	[SerializeField]
	private UINavigationEffect topNavigationEffect;

	// Token: 0x040023A8 RID: 9128
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x40023A8")]
	[SerializeField]
	private GameObject[] topHandlerGroups;

	// Token: 0x040023A9 RID: 9129
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x40023A9")]
	[SerializeField]
	private UILabelHandler backHandler;

	// Token: 0x040023AA RID: 9130
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x40023AA")]
	[SerializeField]
	private UILabelHandler closeHandler;

	// Token: 0x040023AB RID: 9131
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x40023AB")]
	[SerializeField]
	private Image bottomSubmissionEffect;

	// Token: 0x040023AC RID: 9132
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x40023AC")]
	[SerializeField]
	private UINavigationEffect bottomNavigationEffect;

	// Token: 0x040023AD RID: 9133
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x40023AD")]
	[SerializeField]
	private GameStage currentStage;

	// Token: 0x040023AE RID: 9134
	[FieldOffset(Offset = "0xAC")]
	[Token(Token = "0x40023AE")]
	[SerializeField]
	private int currentSavePoint;

	// Token: 0x040023AF RID: 9135
	[FieldOffset(Offset = "0xB0")]
	[Token(Token = "0x40023AF")]
	[SerializeField]
	private GameStage handlerStage;

	// Token: 0x040023B0 RID: 9136
	[FieldOffset(Offset = "0xB4")]
	[Token(Token = "0x40023B0")]
	[SerializeField]
	private int handlerSavePoint;

	// Token: 0x040023B1 RID: 9137
	[Token(Token = "0x40023B1")]
	private const int BACK_HANDLER_INDEX = 900;

	// Token: 0x040023B2 RID: 9138
	[Token(Token = "0x40023B2")]
	private const int CONFIRM_HANDLER_INDEX = 901;
}
