using System;
using Cpp2IlInjected;
using DG.Tweening;
using MarsSDK;
using MEC;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x0200029E RID: 670
[Token(Token = "0x200029E")]
public class UIGameSave : GameCanvasBase
{
	// Token: 0x06001922 RID: 6434 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001922")]
	[Address(RVA = "0x19DF760", Offset = "0x19DE760", VA = "0x1819DF760", Slot = "11")]
	public override void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001923 RID: 6435 RVA: 0x0003D964 File Offset: 0x0003BB64
	[Token(Token = "0x6001923")]
	[Address(RVA = "0x19E07B0", Offset = "0x19DF7B0", VA = "0x1819E07B0")]
	public void SetMode(GameSavePageMode mode)
	{
		this.pageMode = mode;
		LocalizationData localizationData = Game.GetLocalizationData();
		Text text = this.title;
		GameTextData systemText = localizationData.systemText;
		if (this.pageMode == GameSavePageMode.NewGame)
		{
		}
		string text2 = systemText.GetText(22);
		text.text = text2;
		GameFontPack fontPack = localizationData.fontPack;
		Text text3 = this.title;
		Font light = fontPack.light;
		text3.font = light;
	}

	// Token: 0x06001924 RID: 6436 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001924")]
	[Address(RVA = "0x19DF2A0", Offset = "0x19DE2A0", VA = "0x1819DF2A0", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001925 RID: 6437 RVA: 0x0003D9D8 File Offset: 0x0003BBD8
	[Token(Token = "0x6001925")]
	[Address(RVA = "0x19E08A0", Offset = "0x19DF8A0", VA = "0x1819E08A0")]
	private void SetPageActive()
	{
		UINavigationEffect uinavigationEffect = this.saveDataNavigation;
		UIGameSavePage[] array = this.pages;
		int num = this.pageIndex;
		Transform transform = array[num].transform;
		uinavigationEffect.UpdateParent(transform);
		if (!this.arrowController.HasPointerEntered())
		{
			UIGameSavePage[] array2 = this.pages;
			int num2 = this.pageIndex;
			UIGameSavePage uigameSavePage = array2[num2];
			int num3 = this.lastSelectedSaveNumber;
			UINavigator navigator = this.navigator;
			UILabelHandler uilabelHandler = this.backHandler;
			uigameSavePage.SetActive(navigator, uilabelHandler);
			UIGameSaveHandler uigameSaveHandler = uigameSavePage.saveDataHandlers[num3];
			navigator.SetDefaultHandler(uigameSaveHandler);
			UIGameSaveDeleteHandler uigameSaveDeleteHandler = uigameSavePage.deleteHandlers[num3];
			uigameSavePage.lastDeleteHandler = uigameSaveDeleteHandler;
			return;
		}
		UIGameSavePage[] array3 = this.pages;
		int num4 = this.pageIndex;
		UIGameSavePage uigameSavePage2 = array3[num4];
		UILabelHandler uilabelHandler2 = this.backHandler;
		UINavigator navigator2 = this.navigator;
		uigameSavePage2.SetActive(navigator2, uilabelHandler2);
		throw new NullReferenceException();
	}

	// Token: 0x06001926 RID: 6438 RVA: 0x0003DAC8 File Offset: 0x0003BCC8
	[Token(Token = "0x6001926")]
	[Address(RVA = "0x19E1FF0", Offset = "0x19E0FF0", VA = "0x1819E1FF0", Slot = "19")]
	public override void SwitchLeftward()
	{
		this.arrowController.SwitchPageLeftward();
	}

	// Token: 0x06001927 RID: 6439 RVA: 0x0003DAE8 File Offset: 0x0003BCE8
	[Token(Token = "0x6001927")]
	[Address(RVA = "0x19E2310", Offset = "0x19E1310", VA = "0x1819E2310")]
	private int TrySwitchLeftward()
	{
		int num = this.pageIndex;
		if (num != 0)
		{
			int num2 = num - 1;
			this.pageIndex = num2;
			UIGameSavePage uigameSavePage = this.pages[num];
			this.SwitchPage(uigameSavePage);
			return this.pageIndex;
		}
		return -1;
	}

	// Token: 0x06001928 RID: 6440 RVA: 0x0003DB30 File Offset: 0x0003BD30
	[Token(Token = "0x6001928")]
	[Address(RVA = "0x19E22E0", Offset = "0x19E12E0", VA = "0x1819E22E0", Slot = "20")]
	public override void SwitchRightward()
	{
		this.arrowController.SwitchPageRightward();
	}

	// Token: 0x06001929 RID: 6441 RVA: 0x0003DB50 File Offset: 0x0003BD50
	[Token(Token = "0x6001929")]
	[Address(RVA = "0x19E2370", Offset = "0x19E1370", VA = "0x1819E2370")]
	private int TrySwitchRightward()
	{
		int num = this.pageIndex;
		if (num != 2)
		{
			int num2 = num + 1;
			this.pageIndex = num2;
			UIGameSavePage uigameSavePage = this.pages[num];
			this.SwitchPage(uigameSavePage);
			return this.pageIndex;
		}
		return -1;
	}

	// Token: 0x0600192A RID: 6442 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600192A")]
	[Address(RVA = "0x19E2020", Offset = "0x19E1020", VA = "0x1819E2020")]
	private void SwitchPage(UIGameSavePage fadeOutPage)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600192B RID: 6443 RVA: 0x0003DB98 File Offset: 0x0003BD98
	[Token(Token = "0x600192B")]
	[Address(RVA = "0x19E0530", Offset = "0x19DF530", VA = "0x1819E0530")]
	private void OnSwitchPageCompleted()
	{
		UIGameSavePage[] array = this.pages;
		this.canDisplayDeleteHandler = true;
		int num = this.pageIndex;
		ulong num2;
		array[num].canvasGroup.blocksRaycasts = num2 != 0UL;
		if (!this.arrowController.HasPointerEntered())
		{
			UIGameSavePage[] array2 = this.pages;
			int num3 = this.pageIndex;
			UIGameSavePage uigameSavePage = array2[num3];
			int num4 = this.lastSelectedSaveNumber;
			uigameSavePage.AppearDeleteHandler(num4);
			return;
		}
	}

	// Token: 0x0600192C RID: 6444 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600192C")]
	[Address(RVA = "0x19DF6E0", Offset = "0x19DE6E0", VA = "0x1819DF6E0")]
	private Tween GetPageSlideTween(float duration)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600192D RID: 6445 RVA: 0x0003DC0C File Offset: 0x0003BE0C
	[Token(Token = "0x600192D")]
	[Address(RVA = "0x94CB50", Offset = "0x94BB50", VA = "0x18094CB50", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		this.navigator.Move(direction);
	}

	// Token: 0x0600192E RID: 6446 RVA: 0x0003DC2C File Offset: 0x0003BE2C
	[Token(Token = "0x600192E")]
	[Address(RVA = "0x19E03B0", Offset = "0x19DF3B0", VA = "0x1819E03B0")]
	private void OnSaveHandlerSelected(UIHandlerBase handler)
	{
		UINavigationEffect uinavigationEffect = this.saveDataNavigation;
		Vector2 anchoredPosition = handler.rectTransform.anchoredPosition;
		int num = 0;
		uinavigationEffect.UpdatePos(num);
		this.saveDataNavigation.Appear();
		int index = handler.index;
		this.lastSelectedSaveNumber = index;
		if (this.canDisplayDeleteHandler)
		{
			UIGameSavePage[] array = this.pages;
			int num2 = this.pageIndex;
			array[num2].AppearDeleteHandler(index);
		}
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x0600192F RID: 6447 RVA: 0x0003DCA4 File Offset: 0x0003BEA4
	[Token(Token = "0x600192F")]
	[Address(RVA = "0x19E0380", Offset = "0x19DF380", VA = "0x1819E0380")]
	private void OnSaveHandlerDeselected(UIHandlerBase handler)
	{
		this.saveDataNavigation.Hide();
	}

	// Token: 0x06001930 RID: 6448 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001930")]
	[Address(RVA = "0x19E0250", Offset = "0x19DF250", VA = "0x1819E0250")]
	private void OnDeleteHandlerSelected(UIHandlerBase handler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001931 RID: 6449 RVA: 0x0003DCC4 File Offset: 0x0003BEC4
	[Token(Token = "0x6001931")]
	[Address(RVA = "0x9658D0", Offset = "0x9648D0", VA = "0x1809658D0")]
	private void OnDeleteHandlerDeselected(UIHandlerBase handler)
	{
		this.deleteNavigation.Hide();
	}

	// Token: 0x06001932 RID: 6450 RVA: 0x0003DCE4 File Offset: 0x0003BEE4
	[Token(Token = "0x6001932")]
	[Address(RVA = "0x19E01A0", Offset = "0x19DF1A0", VA = "0x1819E01A0")]
	private void OnBackHandlerSelected(UIHandlerBase handler)
	{
		this.bottomNavigationEffect.Appear();
		UIGameSavePage[] array = this.pages;
		this.lastSelectedSaveNumber = (int)((ulong)4294967295L);
		int num = this.pageIndex;
		array[num].HideDeleteHandler();
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x06001933 RID: 6451 RVA: 0x0003DD34 File Offset: 0x0003BF34
	[Token(Token = "0x6001933")]
	[Address(RVA = "0xCBE470", Offset = "0xCBD470", VA = "0x180CBE470")]
	private void OnBackHandlerDeselected(UIHandlerBase handler)
	{
		this.bottomNavigationEffect.Hide();
	}

	// Token: 0x06001934 RID: 6452 RVA: 0x0003DD54 File Offset: 0x0003BF54
	[Token(Token = "0x6001934")]
	[Address(RVA = "0x19E04D0", Offset = "0x19DF4D0", VA = "0x1819E04D0")]
	private void OnSwitchArrowPointerEntered()
	{
		UIGameSavePage[] array = this.pages;
		int num = this.pageIndex;
		array[num].HideDeleteHandler();
		this.navigator.Clear();
	}

	// Token: 0x06001935 RID: 6453 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001935")]
	[Address(RVA = "0x19E1E90", Offset = "0x19E0E90", VA = "0x1819E1E90", Slot = "21")]
	public override void Submit()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001936 RID: 6454 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001936")]
	[Address(RVA = "0x19E0A70", Offset = "0x19DFA70", VA = "0x1819E0A70")]
	private void ShowCreatingGameSaveMessageBox(int navigationIndex)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001937 RID: 6455 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001937")]
	[Address(RVA = "0x19E1520", Offset = "0x19E0520", VA = "0x1819E1520")]
	private void ShowLoadingSameSaveMessageBox(int navigationIndex)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001938 RID: 6456 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001938")]
	[Address(RVA = "0x19E0F60", Offset = "0x19DFF60", VA = "0x1819E0F60")]
	private void ShowDeletingGameSaveMessageBox(int navigationIndex)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001939 RID: 6457 RVA: 0x0003DD8C File Offset: 0x0003BF8C
	[Token(Token = "0x6001939")]
	[Address(RVA = "0x19E0600", Offset = "0x19DF600", VA = "0x1819E0600")]
	private void OpenMessageBox(UIMessageBox messageBox, MessageBoxConfig config)
	{
		int num = 0;
		this.Hide(num);
		this.Lock();
		Action action = delegate
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		};
		MessageBoxConfig messageBoxConfig = config.BindCloseEvent(action);
		messageBox.OpenMsgBox(config);
	}

	// Token: 0x0600193A RID: 6458 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600193A")]
	[Address(RVA = "0x19E06E0", Offset = "0x19DF6E0", VA = "0x1819E06E0")]
	private void PerformSubmitEffect()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600193B RID: 6459 RVA: 0x0003DDCC File Offset: 0x0003BFCC
	[Token(Token = "0x600193B")]
	[Address(RVA = "0x19DF650", Offset = "0x19DE650", VA = "0x1819DF650")]
	private void CreateNewGameSave(GameDifficulty difficulty)
	{
		UIGameSave.<>c__DisplayClass42_0 CS$<>8__locals1 = new UIGameSave.<>c__DisplayClass42_0();
		CS$<>8__locals1.<>4__this = this;
		CS$<>8__locals1.difficulty = difficulty;
		CoroutineHandle coroutineHandle = MECExtensionMethods1.RunCoroutine(CS$<>8__locals1.<CreateNewGameSave>g__WaitNextAction|0());
	}

	// Token: 0x0600193C RID: 6460 RVA: 0x0003DE04 File Offset: 0x0003C004
	[Token(Token = "0x600193C")]
	[Address(RVA = "0x19DFE80", Offset = "0x19DEE80", VA = "0x1819DFE80")]
	private void LoadGameSave(int previewDataIndex)
	{
		UIGameSave.<>c__DisplayClass43_0 CS$<>8__locals1 = new UIGameSave.<>c__DisplayClass43_0();
		CS$<>8__locals1.<>4__this = this;
		CS$<>8__locals1.previewDataIndex = previewDataIndex;
		CoroutineHandle coroutineHandle = MECExtensionMethods1.RunCoroutine(CS$<>8__locals1.<LoadGameSave>g__WaitNextAction|0());
	}

	// Token: 0x0600193D RID: 6461 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600193D")]
	[Address(RVA = "0x19E1DB0", Offset = "0x19E0DB0", VA = "0x1819E1DB0")]
	private void StartGamePlay(GameSave gameSave)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600193E RID: 6462 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600193E")]
	[Address(RVA = "0x19DFF10", Offset = "0x19DEF10", VA = "0x1819DFF10", Slot = "25")]
	public override void Localize(LocalizationData data)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600193F RID: 6463 RVA: 0x0003DE38 File Offset: 0x0003C038
	[Token(Token = "0x600193F")]
	[Address(RVA = "0x19E2590", Offset = "0x19E1590", VA = "0x1819E2590")]
	private void UpdateTitle(LocalizationData data)
	{
		Text text = this.title;
		GameTextData systemText = data.systemText;
		if (this.pageMode == GameSavePageMode.NewGame)
		{
		}
		string text2 = systemText.GetText(22);
		text.text = text2;
		GameFontPack fontPack = data.fontPack;
		Text text3 = this.title;
		Font light = fontPack.light;
		text3.font = light;
	}

	// Token: 0x06001940 RID: 6464 RVA: 0x0003DE94 File Offset: 0x0003C094
	[Token(Token = "0x6001940")]
	[Address(RVA = "0x19E24D0", Offset = "0x19E14D0", VA = "0x1819E24D0")]
	private void UpdateSaveDataContents()
	{
		UIGameSavePage[] array = this.pages;
		int num = 0;
		int length = array.Length;
		if (num < length)
		{
			UIGameSavePage uigameSavePage = array[num];
			LocalizationData localizationData = Game.GetLocalizationData();
			uigameSavePage.UpdateContent(localizationData);
			num++;
		}
	}

	// Token: 0x06001941 RID: 6465 RVA: 0x0003DEDC File Offset: 0x0003C0DC
	[Token(Token = "0x6001941")]
	[Address(RVA = "0x19E2630", Offset = "0x19E1630", VA = "0x1819E2630")]
	public UIGameSave()
	{
	}

	// Token: 0x040023BE RID: 9150
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40023BE")]
	[SerializeField]
	private Text title;

	// Token: 0x040023BF RID: 9151
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40023BF")]
	[SerializeField]
	private int pageIndex;

	// Token: 0x040023C0 RID: 9152
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40023C0")]
	[SerializeField]
	private RectTransform pageRoot;

	// Token: 0x040023C1 RID: 9153
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x40023C1")]
	[SerializeField]
	private UIGameSavePage[] pages;

	// Token: 0x040023C2 RID: 9154
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x40023C2")]
	[SerializeField]
	private UISwitchPageTip switchPageTip;

	// Token: 0x040023C3 RID: 9155
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x40023C3")]
	[SerializeField]
	private UIPageNumber pageNumber;

	// Token: 0x040023C4 RID: 9156
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x40023C4")]
	[SerializeField]
	private UILabelHandler backHandler;

	// Token: 0x040023C5 RID: 9157
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x40023C5")]
	[SerializeField]
	private UISwitchArrowController arrowController;

	// Token: 0x040023C6 RID: 9158
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x40023C6")]
	[SerializeField]
	private UINavigationEffect saveDataNavigation;

	// Token: 0x040023C7 RID: 9159
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x40023C7")]
	[SerializeField]
	private UINavigationEffect deleteNavigation;

	// Token: 0x040023C8 RID: 9160
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x40023C8")]
	[SerializeField]
	private UINavigationEffect bottomNavigationEffect;

	// Token: 0x040023C9 RID: 9161
	[FieldOffset(Offset = "0xB0")]
	[Token(Token = "0x40023C9")]
	[SerializeField]
	private RectTransform bottomSubmissionEffect;

	// Token: 0x040023CA RID: 9162
	[FieldOffset(Offset = "0xB8")]
	[Token(Token = "0x40023CA")]
	private GameSavePageMode pageMode = (GameSavePageMode)((ulong)1L);

	// Token: 0x040023CB RID: 9163
	[FieldOffset(Offset = "0xC0")]
	[Token(Token = "0x40023CB")]
	private Sequence slideProcessor;

	// Token: 0x040023CC RID: 9164
	[FieldOffset(Offset = "0xC8")]
	[Token(Token = "0x40023CC")]
	private int newGameIndex;

	// Token: 0x040023CD RID: 9165
	[FieldOffset(Offset = "0xCC")]
	[Token(Token = "0x40023CD")]
	private bool canDisplayDeleteHandler;

	// Token: 0x040023CE RID: 9166
	[FieldOffset(Offset = "0xD0")]
	[Token(Token = "0x40023CE")]
	private int lastSelectedSaveNumber;
}
