using System;
using Cpp2IlInjected;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x0200027D RID: 637
[Token(Token = "0x200027D")]
public class UISwitchPageTip : MonoBehaviour
{
	// Token: 0x060018A0 RID: 6304 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60018A0")]
	[Address(RVA = "0x18AE910", Offset = "0x18AD710", VA = "0x1818AE910")]
	public void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060018A1 RID: 6305 RVA: 0x0003BD80 File Offset: 0x00039F80
	[Token(Token = "0x60018A1")]
	[Address(RVA = "0x18AEB60", Offset = "0x18AD960", VA = "0x1818AEB60")]
	private void Localize(LocalizationData data)
	{
		Text text = this.leftLabel;
		string text2 = data.systemText.GetText(154);
		text.text = text2;
		GameTextData systemText = data.systemText;
		Text text3 = this.rightLabel;
		string text4 = systemText.GetText(155);
		text3.text = text4;
		GameFontPack fontPack = data.fontPack;
		Text text5 = this.leftLabel;
		Font light = fontPack.light;
		text5.font = light;
		GameFontPack fontPack2 = data.fontPack;
		Text text6 = this.leftKeyboardLabel;
		Font light2 = fontPack2.light;
		text6.font = light2;
		GameFontPack fontPack3 = data.fontPack;
		Text text7 = this.rightLabel;
		Font light3 = fontPack3.light;
		text7.font = light3;
		GameFontPack fontPack4 = data.fontPack;
		Text text8 = this.rightKeyboardLabel;
		Font light4 = fontPack4.light;
		text8.font = light4;
	}

	// Token: 0x060018A2 RID: 6306 RVA: 0x0003BE60 File Offset: 0x0003A060
	[Token(Token = "0x60018A2")]
	[Address(RVA = "0x18AEC90", Offset = "0x18ADA90", VA = "0x1818AEC90")]
	private void UpdateIcon(ControllerDevice device)
	{
		Image image = this.leftIcon;
		if (device != ControllerDevice.Keyboard)
		{
			Sprite gamepadSprite = Game.GetGamepadSprite("UISwitchLeftward");
			image.sprite = gamepadSprite;
			Image image2 = this.rightIcon;
			Sprite gamepadSprite2 = Game.GetGamepadSprite("UISwitchRightward");
			image2.sprite = gamepadSprite2;
			RectTransform rectTransform = this.leftIcon.rectTransform;
			Vector2 one = Vector2.one;
			rectTransform.sizeDelta = one;
			RectTransform rectTransform2 = this.rightIcon.rectTransform;
			Vector2 one2 = Vector2.one;
			rectTransform2.sizeDelta = one2;
			GameObject gameObject = this.leftKeyboardLabel.gameObject;
			int num = 0;
			gameObject.SetActive(num != 0);
			GameObject gameObject2 = this.rightKeyboardLabel.gameObject;
			int num2 = 0;
			gameObject2.SetActive(num2 != 0);
			return;
		}
		Sprite keyboardButtonSprite = Game.GetKeyboardButtonSprite();
		image.sprite = keyboardButtonSprite;
		Image image3 = this.rightIcon;
		Sprite keyboardButtonSprite2 = Game.GetKeyboardButtonSprite();
		image3.sprite = keyboardButtonSprite2;
		RectTransform rectTransform3 = this.leftIcon.rectTransform;
		Vector2 one3 = Vector2.one;
		rectTransform3.sizeDelta = one3;
		RectTransform rectTransform4 = this.rightIcon.rectTransform;
		Vector2 one4 = Vector2.one;
		rectTransform4.sizeDelta = one4;
		this.leftKeyboardLabel.gameObject.SetActive(true);
		GameObject gameObject3 = this.rightKeyboardLabel.gameObject;
		throw new NullReferenceException();
	}

	// Token: 0x060018A3 RID: 6307 RVA: 0x0003BFB0 File Offset: 0x0003A1B0
	[Token(Token = "0x60018A3")]
	[Address(RVA = "0x18AE810", Offset = "0x18AD610", VA = "0x1818AE810")]
	public void Dispose()
	{
		Game.onLanguageChanged -= new Action(this.Localize);
		Game.RemoveDeviceChangedHandler(new Action(this.UpdateIcon));
	}

	// Token: 0x060018A4 RID: 6308 RVA: 0x0003BFE0 File Offset: 0x0003A1E0
	[Token(Token = "0x60018A4")]
	[Address(RVA = "0x3088F0", Offset = "0x3076F0", VA = "0x1803088F0")]
	public UISwitchPageTip()
	{
	}

	// Token: 0x04002299 RID: 8857
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4002299")]
	[SerializeField]
	private Image leftIcon;

	// Token: 0x0400229A RID: 8858
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x400229A")]
	[SerializeField]
	private Text leftLabel;

	// Token: 0x0400229B RID: 8859
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x400229B")]
	[SerializeField]
	private Text leftKeyboardLabel;

	// Token: 0x0400229C RID: 8860
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x400229C")]
	[SerializeField]
	private Image rightIcon;

	// Token: 0x0400229D RID: 8861
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x400229D")]
	[SerializeField]
	private Text rightLabel;

	// Token: 0x0400229E RID: 8862
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x400229E")]
	[SerializeField]
	private Text rightKeyboardLabel;
}
