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

// Token: 0x02000268 RID: 616
[Token(Token = "0x2000268")]
public class UIValuablesDesc : GameCanvasBase
{
	// Token: 0x060017B9 RID: 6073 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017B9")]
	[Address(RVA = "0x8B1FA0", Offset = "0x8B0DA0", VA = "0x1808B1FA0")]
	public void SetValuablesDescData(ValuablesDescData descData)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017BA RID: 6074 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017BA")]
	[Address(RVA = "0x8B10C0", Offset = "0x8AFEC0", VA = "0x1808B10C0", Slot = "11")]
	public override void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017BB RID: 6075 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017BB")]
	[Address(RVA = "0x8B1C50", Offset = "0x8B0A50", VA = "0x1808B1C50")]
	private void OnControllerChanged(ControllerDevice device)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017BC RID: 6076 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017BC")]
	[Address(RVA = "0x8B0D60", Offset = "0x8AFB60", VA = "0x1808B0D60", Slot = "12")]
	protected override void Appear(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017BD RID: 6077 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017BD")]
	[Address(RVA = "0x8B1000", Offset = "0x8AFE00", VA = "0x1808B1000", Slot = "13")]
	protected override void Hide(Action completeHandler)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017BE RID: 6078 RVA: 0x0003A1C0 File Offset: 0x000383C0
	[Token(Token = "0x60017BE")]
	[Address(RVA = "0x764EC0", Offset = "0x763CC0", VA = "0x180764EC0", Slot = "18")]
	public override void Move(Direction2D direction)
	{
		this.navigator.Move(direction);
	}

	// Token: 0x060017BF RID: 6079 RVA: 0x0003A1E0 File Offset: 0x000383E0
	[Token(Token = "0x60017BF")]
	[Address(RVA = "0x8B2200", Offset = "0x8B1000", VA = "0x1808B2200", Slot = "21")]
	public override void Submit()
	{
		UIHandlerBase currentHandler = this.navigator.currentHandler;
		int num = 0;
		if (!(currentHandler == num))
		{
			int index = this.navigator.currentHandler.index;
			if (index == 0)
			{
				this.PerformSubmitEffect();
				Game.PlayCanvasSE(UICanvasSFX.Close);
				base.Close();
			}
			if (index == 1)
			{
				this.PerformSubmitEffect();
				Game.CloseStageUI();
			}
			Game.PlayHandlerScaleEffect(this.navigator.currentHandler);
			return;
		}
	}

	// Token: 0x060017C0 RID: 6080 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017C0")]
	[Address(RVA = "0x8B1FD0", Offset = "0x8B0DD0", VA = "0x1808B1FD0", Slot = "24")]
	public override void SpecialAction()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017C1 RID: 6081 RVA: 0x0003A254 File Offset: 0x00038454
	[Token(Token = "0x60017C1")]
	[Address(RVA = "0x8B17C0", Offset = "0x8B05C0", VA = "0x1808B17C0", Slot = "25")]
	public override void Localize(LocalizationData data)
	{
		string[] array3;
		string text11;
		for (;;)
		{
			Text text = this.title;
			string text2 = data.systemText.GetText(11);
			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.confirmHandler;
			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.valuablesName;
			Font light2 = fontPack2.light;
			text6.font = light2;
			GameFontPack fontPack3 = data.fontPack;
			Text text7 = this.description;
			Font regular = fontPack3.regular;
			text7.font = regular;
			GameFontPack fontPack4 = data.fontPack;
			UILabelHandler uilabelHandler3 = this.backHandler;
			Font medium = fontPack4.medium;
			uilabelHandler3.SetFont(medium);
			GameFontPack fontPack5 = data.fontPack;
			UILabelHandler uilabelHandler4 = this.confirmHandler;
			Font medium2 = fontPack5.medium;
			uilabelHandler4.SetFont(medium2);
			GameFontPack fontPack6 = data.fontPack;
			Text text8 = this.voiceOperation;
			Font light3 = fontPack6.light;
			text8.font = light3;
			string text9 = data.systemText.GetText(270);
			string[] array = text9.Split(new char[] { (char)((uint)47) });
			string[] array2 = this.voiceOperationText;
			string text10 = array[0].Trim();
			if (text10 == 0 || text10 != 0)
			{
				array2[0] = text10;
				array3 = this.voiceOperationText;
				text11 = array[1].Trim();
				if (text11 == 0 || text11 != 0)
				{
					break;
				}
			}
		}
		array3[1] = text11;
		throw new NullReferenceException();
	}

	// Token: 0x060017C2 RID: 6082 RVA: 0x0003A424 File Offset: 0x00038624
	[Token(Token = "0x60017C2")]
	[Address(RVA = "0x8B1F50", Offset = "0x8B0D50", VA = "0x1808B1F50")]
	private void ResetUIStatus()
	{
		UINavigator navigator = this.navigator;
		UILabelHandler uilabelHandler = this.backHandler;
		navigator.SetDefaultHandler(uilabelHandler);
		GameObject gameObject = this.interactionIcon.gameObject;
		int num = 0;
		gameObject.SetActive(num != 0);
	}

	// Token: 0x060017C3 RID: 6083 RVA: 0x0003A464 File Offset: 0x00038664
	[Token(Token = "0x60017C3")]
	[Address(RVA = "0x8B1B50", Offset = "0x8B0950", VA = "0x1808B1B50")]
	private void MarkUIDirty()
	{
		string name = this.currentValuablesDescData.Name;
		Text text = this.valuablesName;
		string text2 = name.Replace("\n", "");
		text.text = text2;
		Text text3 = this.description;
		string text4 = this.currentValuablesDescData.Description;
		text3.text = text4;
		Sprite[] array = this.iconSprites;
		Image image = this.mainIcon;
		ValuablesDescData valuablesDescData = this.currentValuablesDescData;
		Sprite sprite = array[valuablesDescData];
		image.sprite = sprite;
	}

	// Token: 0x060017C4 RID: 6084 RVA: 0x0003A4EC File Offset: 0x000386EC
	[Token(Token = "0x60017C4")]
	[Address(RVA = "0x8B1D20", Offset = "0x8B0B20", VA = "0x1808B1D20")]
	private void OnHandlerSelected(UIHandlerBase handler)
	{
		if (!this.navigationEffect.gameObject.activeInHierarchy)
		{
			this.navigationEffect.gameObject.SetActive(true);
		}
		UINavigationEffect uinavigationEffect = this.navigationEffect;
		Vector2 anchoredPosition = handler.rectTransform.anchoredPosition;
		uinavigationEffect.UpdatePos(anchoredPosition);
		UINavigationEffect uinavigationEffect2 = this.navigationEffect;
		if (handler.index != 0)
		{
		}
		UILabelHandler uilabelHandler = this.backHandler;
		uinavigationEffect2.UpdateArrowPos(uilabelHandler);
		Game.PlayHandlerSE(UIHandlerSFX.Navigation);
	}

	// Token: 0x060017C5 RID: 6085 RVA: 0x0003A564 File Offset: 0x00038764
	[Token(Token = "0x60017C5")]
	[Address(RVA = "0x8B1CB0", Offset = "0x8B0AB0", VA = "0x1808B1CB0")]
	private void OnHandlerDeselected(UIHandlerBase handler)
	{
		if (this.navigationEffect.gameObject.activeInHierarchy)
		{
			GameObject gameObject = this.navigationEffect.gameObject;
			int num = 0;
			gameObject.SetActive(num != 0);
			return;
		}
	}

	// Token: 0x060017C6 RID: 6086 RVA: 0x0003A5A0 File Offset: 0x000387A0
	[Token(Token = "0x60017C6")]
	[Address(RVA = "0x8B1E50", Offset = "0x8B0C50", VA = "0x1808B1E50")]
	private void PerformSubmitEffect()
	{
		RectTransform rectTransform = this.interactionIcon.rectTransform;
		Vector2 anchoredPosition = this.navigator.currentHandler.rectTransform.anchoredPosition;
		rectTransform.anchoredPosition = anchoredPosition;
		this.interactionIcon.gameObject.SetActive(true);
	}

	// Token: 0x060017C7 RID: 6087 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60017C7")]
	[Address(RVA = "0x8B1EE0", Offset = "0x8B0CE0", VA = "0x1808B1EE0")]
	private IEnumerator<float> PlayVoice()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060017C8 RID: 6088 RVA: 0x0003A5F0 File Offset: 0x000387F0
	[Token(Token = "0x60017C8")]
	[Address(RVA = "0x8B2360", Offset = "0x8B1160", VA = "0x1808B2360")]
	public UIValuablesDesc()
	{
		string[] array = new string[2];
		this.voiceOperationText = array;
		base..ctor();
	}

	// Token: 0x040021FB RID: 8699
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40021FB")]
	[SerializeField]
	private Text title;

	// Token: 0x040021FC RID: 8700
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40021FC")]
	[SerializeField]
	private UILabelHandler backHandler;

	// Token: 0x040021FD RID: 8701
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40021FD")]
	[SerializeField]
	private UILabelHandler confirmHandler;

	// Token: 0x040021FE RID: 8702
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x40021FE")]
	[SerializeField]
	private Text valuablesName;

	// Token: 0x040021FF RID: 8703
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x40021FF")]
	[SerializeField]
	private Text description;

	// Token: 0x04002200 RID: 8704
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4002200")]
	[SerializeField]
	private Image mainIcon;

	// Token: 0x04002201 RID: 8705
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4002201")]
	[SerializeField]
	private Sprite[] iconSprites;

	// Token: 0x04002202 RID: 8706
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4002202")]
	[SerializeField]
	private UINavigationEffect navigationEffect;

	// Token: 0x04002203 RID: 8707
	[FieldOffset(Offset = "0x98")]
	[Token(Token = "0x4002203")]
	[SerializeField]
	private Image interactionIcon;

	// Token: 0x04002204 RID: 8708
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x4002204")]
	[SerializeField]
	private RectTransform inputIconRoot;

	// Token: 0x04002205 RID: 8709
	[FieldOffset(Offset = "0xA8")]
	[Token(Token = "0x4002205")]
	[SerializeField]
	private UIInputIcon inputIcon;

	// Token: 0x04002206 RID: 8710
	[FieldOffset(Offset = "0xB0")]
	[Token(Token = "0x4002206")]
	[SerializeField]
	private Text voiceOperation;

	// Token: 0x04002207 RID: 8711
	[FieldOffset(Offset = "0xB8")]
	[Token(Token = "0x4002207")]
	[SerializeField]
	private AudioSource voicePlayer;

	// Token: 0x04002208 RID: 8712
	[FieldOffset(Offset = "0xC0")]
	[Token(Token = "0x4002208")]
	private ValuablesDescData currentValuablesDescData;

	// Token: 0x04002209 RID: 8713
	[FieldOffset(Offset = "0xD8")]
	[Token(Token = "0x4002209")]
	private Dictionary<int, string> voiceMap;

	// Token: 0x0400220A RID: 8714
	[FieldOffset(Offset = "0xE0")]
	[Token(Token = "0x400220A")]
	private CoroutineHandle voiceProcessor;

	// Token: 0x0400220B RID: 8715
	[FieldOffset(Offset = "0xE8")]
	[Token(Token = "0x400220B")]
	private string[] voiceOperationText;
}
