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

// Token: 0x020002C7 RID: 711
[Token(Token = "0x20002C7")]
public class UISwitchPageTip : MonoBehaviour
{
	// Token: 0x06001AC3 RID: 6851 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001AC3")]
	[Address(RVA = "0x9623C0", Offset = "0x9613C0", VA = "0x1809623C0")]
	public void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001AC4 RID: 6852 RVA: 0x000415A4 File Offset: 0x0003F7A4
	[Token(Token = "0x6001AC4")]
	[Address(RVA = "0x962610", Offset = "0x961610", VA = "0x180962610")]
	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: 0x06001AC5 RID: 6853 RVA: 0x00041684 File Offset: 0x0003F884
	[Token(Token = "0x6001AC5")]
	[Address(RVA = "0x962740", Offset = "0x961740", VA = "0x180962740")]
	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: 0x06001AC6 RID: 6854 RVA: 0x000417D4 File Offset: 0x0003F9D4
	[Token(Token = "0x6001AC6")]
	[Address(RVA = "0x9622C0", Offset = "0x9612C0", VA = "0x1809622C0")]
	public void Dispose()
	{
		Game.onLanguageChanged -= new Action(this.Localize);
		Game.RemoveDeviceChangedHandler(new Action(this.UpdateIcon));
	}

	// Token: 0x06001AC7 RID: 6855 RVA: 0x00041804 File Offset: 0x0003FA04
	[Token(Token = "0x6001AC7")]
	[Address(RVA = "0x328C40", Offset = "0x327C40", VA = "0x180328C40")]
	public UISwitchPageTip()
	{
	}

	// Token: 0x040024EA RID: 9450
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x40024EA")]
	[SerializeField]
	private Image leftIcon;

	// Token: 0x040024EB RID: 9451
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40024EB")]
	[SerializeField]
	private Text leftLabel;

	// Token: 0x040024EC RID: 9452
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x40024EC")]
	[SerializeField]
	private Text leftKeyboardLabel;

	// Token: 0x040024ED RID: 9453
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x40024ED")]
	[SerializeField]
	private Image rightIcon;

	// Token: 0x040024EE RID: 9454
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x40024EE")]
	[SerializeField]
	private Text rightLabel;

	// Token: 0x040024EF RID: 9455
	[FieldOffset(Offset = "0x40")]
	[Token(Token = "0x40024EF")]
	[SerializeField]
	private Text rightKeyboardLabel;
}
