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

// Token: 0x020002CA RID: 714
[Token(Token = "0x20002CA")]
public class UIItemBar : MonoBehaviour
{
	// Token: 0x06001AAD RID: 6829 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001AAD")]
	[Address(RVA = "0x76C7D0", Offset = "0x76B5D0", VA = "0x18076C7D0")]
	public void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001AAE RID: 6830 RVA: 0x0003FC9C File Offset: 0x0003DE9C
	[Token(Token = "0x6001AAE")]
	[Address(RVA = "0x502B20", Offset = "0x501920", VA = "0x180502B20")]
	public int GetItemSelectPos()
	{
		return this.itemSelectPos;
	}

	// Token: 0x06001AAF RID: 6831 RVA: 0x0003FCB0 File Offset: 0x0003DEB0
	[Token(Token = "0x6001AAF")]
	[Address(RVA = "0x76D820", Offset = "0x76C620", VA = "0x18076D820")]
	public void UpdateItemSprite(ItemSystem.ItemType[] holdItem)
	{
		int num = 0;
		if (this.itemSize > num)
		{
			UIItem uiitem = this.itemElements[num];
			UIItemSprite uiitemSprite = this.itemSpriteCollection;
			ItemSystem.ItemType itemType = holdItem[num];
			Sprite itemSprite = uiitemSprite.GetItemSprite(itemType);
			uiitem.g_ItemImg.sprite = itemSprite;
			num++;
		}
	}

	// Token: 0x06001AB0 RID: 6832 RVA: 0x0003FD04 File Offset: 0x0003DF04
	[Token(Token = "0x6001AB0")]
	[Address(RVA = "0x76D360", Offset = "0x76C160", VA = "0x18076D360")]
	public void UpdateItemSelectMove(int iPos)
	{
		RectTransform rectTransform = this.itemSelectFrame;
		int num = 0;
		if (!(rectTransform == num) && this.itemElementRects != (ulong)0L)
		{
			int num2 = this.itemSize;
			int num3 = 0;
			int num4 = Mathf.Clamp(iPos, num3, num2);
			RectTransform[] array = this.itemElementRects;
			RectTransform rectTransform2 = this.itemSelectFrame;
			this.itemSelectPos = num4;
			Vector2 anchoredPosition = array[num4].anchoredPosition;
			rectTransform2.anchoredPosition = anchoredPosition;
		}
	}

	// Token: 0x06001AB1 RID: 6833 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001AB1")]
	[Address(RVA = "0x76D440", Offset = "0x76C240", VA = "0x18076D440")]
	public void UpdateItemSize(int size)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001AB2 RID: 6834 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001AB2")]
	[Address(RVA = "0x76CF50", Offset = "0x76BD50", VA = "0x18076CF50")]
	public void UpdateInstructions(ItemSystem.ItemType itemType)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001AB3 RID: 6835 RVA: 0x0003FD7C File Offset: 0x0003DF7C
	[Token(Token = "0x6001AB3")]
	[Address(RVA = "0x76CE20", Offset = "0x76BC20", VA = "0x18076CE20")]
	public void Localize(LocalizationData data)
	{
		UIItem[] array = this.itemElements;
		int num = 0;
		int length = array.Length;
		if (num < length)
		{
			UIItem uiitem = array[num];
			GameFontPack fontPack = data.fontPack;
			Text g_TextNum = uiitem.g_TextNum;
			Font light = fontPack.light;
			g_TextNum.font = light;
			num++;
		}
		GameFontPack fontPack2 = data.fontPack;
		Text text = this.instructionsLabel;
		Font regular = fontPack2.regular;
		text.font = regular;
	}

	// Token: 0x06001AB4 RID: 6836 RVA: 0x0003FDF4 File Offset: 0x0003DFF4
	[Token(Token = "0x6001AB4")]
	[Address(RVA = "0x76C580", Offset = "0x76B380", VA = "0x18076C580")]
	public void Dispose()
	{
		CoroutineHandle[] array = new CoroutineHandle[3];
		int length = array.Length;
		CoroutineHandle coroutineHandle = this.itemBarProcessor;
		array[0] = coroutineHandle;
		CoroutineHandle coroutineHandle2 = this.newItemProcessor;
		array[0] = coroutineHandle2;
		CoroutineHandle coroutineHandle3 = this.instructionsProcessor;
		array[1] = coroutineHandle3;
		int num = Timing.KillCoroutines(array);
		Game.RemoveDeviceChangedHandler(new Action(this.UpdateItemHotKey));
	}

	// Token: 0x06001AB5 RID: 6837 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001AB5")]
	[Address(RVA = "0x76CEE0", Offset = "0x76BCE0", VA = "0x18076CEE0")]
	private IEnumerator<float> MoveItemBar()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001AB6 RID: 6838 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001AB6")]
	[Address(RVA = "0x76C760", Offset = "0x76B560", VA = "0x18076C760")]
	private IEnumerator<float> FadeOutNewItem()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001AB7 RID: 6839 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001AB7")]
	[Address(RVA = "0x76C6F0", Offset = "0x76B4F0", VA = "0x18076C6F0")]
	private IEnumerator<float> FadeOutInstructions()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001AB8 RID: 6840 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001AB8")]
	[Address(RVA = "0x76D1F0", Offset = "0x76BFF0", VA = "0x18076D1F0")]
	private void UpdateItemHotKey(ControllerDevice controllerDevice)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001AB9 RID: 6841 RVA: 0x0003FE60 File Offset: 0x0003E060
	[Token(Token = "0x6001AB9")]
	[Address(RVA = "0x76D8E0", Offset = "0x76C6E0", VA = "0x18076D8E0")]
	public UIItemBar()
	{
	}

	// Token: 0x0400249B RID: 9371
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x400249B")]
	[SerializeField]
	private GameObject itemElementPrefab;

	// Token: 0x0400249C RID: 9372
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x400249C")]
	[SerializeField]
	private RectTransform itemBarRoot;

	// Token: 0x0400249D RID: 9373
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x400249D")]
	[SerializeField]
	private RectTransform itemSelectFrame;

	// Token: 0x0400249E RID: 9374
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x400249E")]
	[SerializeField]
	private Image newItemImg;

	// Token: 0x0400249F RID: 9375
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x400249F")]
	[SerializeField]
	private Image instructionsImg;

	// Token: 0x040024A0 RID: 9376
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x40024A0")]
	[SerializeField]
	private Text instructionsLabel;

	// Token: 0x040024A1 RID: 9377
	[FieldOffset(Offset = "0x48")]
	[Token(Token = "0x40024A1")]
	private RectTransform[] itemElementRects;

	// Token: 0x040024A2 RID: 9378
	[FieldOffset(Offset = "0x50")]
	[Token(Token = "0x40024A2")]
	private UIItem[] itemElements;

	// Token: 0x040024A3 RID: 9379
	[FieldOffset(Offset = "0x58")]
	[Token(Token = "0x40024A3")]
	private UIItemSprite itemSpriteCollection;

	// Token: 0x040024A4 RID: 9380
	[FieldOffset(Offset = "0x60")]
	[Token(Token = "0x40024A4")]
	private float itemBarRootPos = -105f;

	// Token: 0x040024A5 RID: 9381
	[FieldOffset(Offset = "0x64")]
	[Token(Token = "0x40024A5")]
	private int itemSize = (int)((ulong)4L);

	// Token: 0x040024A6 RID: 9382
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x40024A6")]
	private int itemSelectPos;

	// Token: 0x040024A7 RID: 9383
	[FieldOffset(Offset = "0x6C")]
	[Token(Token = "0x40024A7")]
	private float newItemAlpha;

	// Token: 0x040024A8 RID: 9384
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x40024A8")]
	private float instructionsAlpha;

	// Token: 0x040024A9 RID: 9385
	[FieldOffset(Offset = "0x74")]
	[Token(Token = "0x40024A9")]
	private float instructionsStayTimeVal;

	// Token: 0x040024AA RID: 9386
	[Token(Token = "0x40024AA")]
	private const int DEFAULT_ITEM_SIZE = 4;

	// Token: 0x040024AB RID: 9387
	[Token(Token = "0x40024AB")]
	private const float INSTRUC_STAY_TIME = 2.5f;

	// Token: 0x040024AC RID: 9388
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x40024AC")]
	private CoroutineHandle itemBarProcessor;

	// Token: 0x040024AD RID: 9389
	[FieldOffset(Offset = "0x7C")]
	[Token(Token = "0x40024AD")]
	private CoroutineHandle newItemProcessor;

	// Token: 0x040024AE RID: 9390
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x40024AE")]
	private CoroutineHandle instructionsProcessor;
}
