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

// Token: 0x02000312 RID: 786
[Token(Token = "0x2000312")]
public class UIGameTipContentElement : MonoBehaviour
{
	// Token: 0x1700013F RID: 319
	// (get) Token: 0x06001CCE RID: 7374 RVA: 0x00045328 File Offset: 0x00043528
	[Token(Token = "0x1700013F")]
	public RectTransform Root
	{
		[Token(Token = "0x6001CCE")]
		[Address(RVA = "0x2EF530", Offset = "0x2EE530", VA = "0x1802EF530")]
		get
		{
			return this.root;
		}
	}

	// Token: 0x06001CCF RID: 7375 RVA: 0x0004533C File Offset: 0x0004353C
	[Token(Token = "0x6001CCF")]
	[Address(RVA = "0x19E2650", Offset = "0x19E1650", VA = "0x1819E2650")]
	public void Init()
	{
		RectTransform rectTransform = this.root;
		int num = 0;
		if (rectTransform == num)
		{
			RectTransform component = base.GetComponent<RectTransform>();
			this.root = component;
		}
		Text text = this.label;
		int num2 = 0;
		if (text == num2)
		{
			Text component2 = base.GetComponent<Text>();
			this.label = component2;
		}
	}

	// Token: 0x06001CD0 RID: 7376 RVA: 0x00045390 File Offset: 0x00043590
	[Token(Token = "0x6001CD0")]
	[Address(RVA = "0x19E27A0", Offset = "0x19E17A0", VA = "0x1819E27A0")]
	public void UpdateContent(string data, out float labelWidth)
	{
		this.label.text = data;
		float preferredWidth = this.label.preferredWidth;
		labelWidth.m_value = preferredWidth;
	}

	// Token: 0x06001CD1 RID: 7377 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001CD1")]
	[Address(RVA = "0x19E2800", Offset = "0x19E1800", VA = "0x1819E2800")]
	public void UpdateElementSize()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001CD2 RID: 7378 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001CD2")]
	[Address(RVA = "0x19E2840", Offset = "0x19E1840", VA = "0x1819E2840")]
	public void UpdateRect(bool isFirstElement)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001CD3 RID: 7379 RVA: 0x000453C4 File Offset: 0x000435C4
	[Token(Token = "0x6001CD3")]
	[Address(RVA = "0xE7B990", Offset = "0xE7A990", VA = "0x180E7B990")]
	public void UpdateAnchoredPosition(Vector2 position)
	{
		this.root.anchoredPosition = position;
	}

	// Token: 0x06001CD4 RID: 7380 RVA: 0x000453E4 File Offset: 0x000435E4
	[Token(Token = "0x6001CD4")]
	[Address(RVA = "0x19E2750", Offset = "0x19E1750", VA = "0x1819E2750")]
	public void SetLabelVisible(bool isVisible)
	{
		this.label.enabled = isVisible;
	}

	// Token: 0x06001CD5 RID: 7381 RVA: 0x00045404 File Offset: 0x00043604
	[Token(Token = "0x6001CD5")]
	[Address(RVA = "0xE6A460", Offset = "0xE69460", VA = "0x180E6A460")]
	public void SetFont(GameFontPack fontPack)
	{
		Text text = this.label;
		Font regular = fontPack.regular;
		text.font = regular;
	}

	// Token: 0x06001CD6 RID: 7382 RVA: 0x0004542C File Offset: 0x0004362C
	[Token(Token = "0x6001CD6")]
	[Address(RVA = "0x19E2770", Offset = "0x19E1770", VA = "0x1819E2770")]
	public void SetParent(Transform parent)
	{
		base.transform.parentInternal = parent;
	}

	// Token: 0x06001CD7 RID: 7383 RVA: 0x0004544C File Offset: 0x0004364C
	[Token(Token = "0x6001CD7")]
	[Address(RVA = "0x13B7D20", Offset = "0x13B6D20", VA = "0x1813B7D20")]
	public void SetElementWidth(float width)
	{
		this.elementWidth = width;
	}

	// Token: 0x06001CD8 RID: 7384 RVA: 0x00045460 File Offset: 0x00043660
	[Token(Token = "0x6001CD8")]
	[Address(RVA = "0x328C40", Offset = "0x327C40", VA = "0x180328C40")]
	public UIGameTipContentElement()
	{
	}

	// Token: 0x04002700 RID: 9984
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4002700")]
	private RectTransform root;

	// Token: 0x04002701 RID: 9985
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4002701")]
	private Text label;

	// Token: 0x04002702 RID: 9986
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4002702")]
	private float elementWidth;

	// Token: 0x04002703 RID: 9987
	[Token(Token = "0x4002703")]
	private const float DEFAULT_ELEMENT_HEIGHT = 50f;
}
