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

// Token: 0x0200030A RID: 778
[Token(Token = "0x200030A")]
public class UIInteractionPromptController : MonoBehaviour
{
	// Token: 0x06001C92 RID: 7314 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001C92")]
	[Address(RVA = "0xE6AD50", Offset = "0xE69D50", VA = "0x180E6AD50")]
	public void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001C93 RID: 7315 RVA: 0x00044A78 File Offset: 0x00042C78
	[Token(Token = "0x6001C93")]
	[Address(RVA = "0xE6A9D0", Offset = "0xE699D0", VA = "0x180E6A9D0")]
	public void Appear(string content)
	{
		UIInteractionPrompt[] array = this.prompts;
		int num = this.promptIndex;
		UIInteractionPrompt uiinteractionPrompt = array[num];
		bool flag;
		if (uiinteractionPrompt.gameObject.activeSelf)
		{
			flag = uiinteractionPrompt.fadeInProcessor.IsPlaying();
			if (flag)
			{
				uiinteractionPrompt.fadeInProcessor.Complete();
			}
			uiinteractionPrompt.fadeOutProcessor.Restart(true, -1f);
		}
		int num2 = this.promptIndex;
		num2++;
		if (flag < false)
		{
			num2++;
		}
		this.promptIndex = num2;
		UIInteractionPrompt uiinteractionPrompt2 = this.prompts[num2];
		uiinteractionPrompt2.content.text = content;
		if (uiinteractionPrompt2.fadeOutProcessor.IsPlaying())
		{
			uiinteractionPrompt2.fadeOutProcessor.Complete();
		}
		uiinteractionPrompt2.fadeInProcessor.Restart(true, -1f);
		Game.PlayCanvasSE(UICanvasSFX.InteractionTip);
	}

	// Token: 0x06001C94 RID: 7316 RVA: 0x00044B4C File Offset: 0x00042D4C
	[Token(Token = "0x6001C94")]
	[Address(RVA = "0xE6ACC0", Offset = "0xE69CC0", VA = "0x180E6ACC0")]
	public void Hide()
	{
		UIInteractionPrompt[] array = this.prompts;
		int num = this.promptIndex;
		UIInteractionPrompt uiinteractionPrompt = array[num];
		if (uiinteractionPrompt.gameObject.activeSelf)
		{
			if (uiinteractionPrompt.fadeInProcessor.IsPlaying())
			{
				uiinteractionPrompt.fadeInProcessor.Complete();
			}
			uiinteractionPrompt.fadeOutProcessor.Restart(true, -1f);
			return;
		}
	}

	// Token: 0x06001C95 RID: 7317 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001C95")]
	[Address(RVA = "0xE6B000", Offset = "0xE6A000", VA = "0x180E6B000")]
	public void UpdateInputIcons(ControllerDevice device)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001C96 RID: 7318 RVA: 0x00044BB0 File Offset: 0x00042DB0
	[Token(Token = "0x6001C96")]
	[Address(RVA = "0xE6AF30", Offset = "0xE69F30", VA = "0x180E6AF30")]
	public void Localize(LocalizationData data)
	{
		UIInteractionPrompt[] array = this.prompts;
		int num = 0;
		int length = array.Length;
		if (num < length)
		{
			UIInteractionPrompt uiinteractionPrompt = array[num];
			GameFontPack fontPack = data.fontPack;
			Text content = uiinteractionPrompt.content;
			Font medium = fontPack.medium;
			content.font = medium;
			Text label = uiinteractionPrompt.inputIcon.label;
			Font regular = fontPack.regular;
			label.font = regular;
			num++;
		}
	}

	// Token: 0x06001C97 RID: 7319 RVA: 0x00044C24 File Offset: 0x00042E24
	[Token(Token = "0x6001C97")]
	[Address(RVA = "0xE6AB60", Offset = "0xE69B60", VA = "0x180E6AB60")]
	public void Dispose()
	{
		UIInteractionPrompt[] array = this.prompts;
		int num = 0;
		int length = array.Length;
		if (num < length)
		{
			UIInteractionPrompt uiinteractionPrompt = array[num];
			Sequence fadeInProcessor = uiinteractionPrompt.fadeInProcessor;
			int num2 = 0;
			fadeInProcessor.Kill(num2 != 0);
			Sequence fadeOutProcessor = uiinteractionPrompt.fadeOutProcessor;
			int num3 = 0;
			fadeOutProcessor.Kill(num3 != 0);
			num++;
		}
		Game.RemoveDeviceChangedHandler(new Action(this.UpdateInputIcons));
		Game.RemoveKeyBindingChangedHandler(new Action(this.UpdateInputIcons));
	}

	// Token: 0x06001C98 RID: 7320 RVA: 0x00044CA4 File Offset: 0x00042EA4
	[Token(Token = "0x6001C98")]
	[Address(RVA = "0x4AB8E0", Offset = "0x4AA8E0", VA = "0x1804AB8E0")]
	public UIInteractionPromptController()
	{
	}

	// Token: 0x040026A3 RID: 9891
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x40026A3")]
	[SerializeField]
	private UIInteractionPrompt[] prompts;

	// Token: 0x040026A4 RID: 9892
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40026A4")]
	[SerializeField]
	private int promptIndex = (int)((ulong)4294967295L);
}
