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

// Token: 0x02000039 RID: 57
[Token(Token = "0x2000039")]
public class BugReporter : MonoBehaviour
{
	// Token: 0x060001A9 RID: 425 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60001A9")]
	[Address(RVA = "0xB873D0", Offset = "0xB863D0", VA = "0x180B873D0")]
	private void Awake()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060001AA RID: 426 RVA: 0x00006A84 File Offset: 0x00004C84
	[Token(Token = "0x60001AA")]
	[Address(RVA = "0xB87FC0", Offset = "0xB86FC0", VA = "0x180B87FC0")]
	private void Update()
	{
		this.logHistory.Update();
	}

	// Token: 0x060001AB RID: 427 RVA: 0x00006AA4 File Offset: 0x00004CA4
	[Token(Token = "0x60001AB")]
	[Address(RVA = "0xB87ED0", Offset = "0xB86ED0", VA = "0x180B87ED0")]
	private void OnDestroy()
	{
		LogHistory logHistory = this.logHistory;
		if (logHistory != 0)
		{
			logHistory.Dispose();
			return;
		}
	}

	// Token: 0x060001AC RID: 428 RVA: 0x00006AC4 File Offset: 0x00004CC4
	[Token(Token = "0x60001AC")]
	[Address(RVA = "0xB874F0", Offset = "0xB864F0", VA = "0x180B874F0")]
	public void Clear()
	{
		this.logHistory.Clear();
	}

	// Token: 0x060001AD RID: 429 RVA: 0x00006AE4 File Offset: 0x00004CE4
	[Token(Token = "0x60001AD")]
	[Address(RVA = "0xB87DF0", Offset = "0xB86DF0", VA = "0x180B87DF0")]
	private void Initialize()
	{
		LogHistory logHistory = new LogHistory();
		this.logHistory = logHistory;
		LogHistory logHistory2 = this.logHistory;
		Action<LogHistoryItem> action = new Action(this.OnLogItemAdded);
		logHistory2.LogHistoryItemAdded += action;
		this.logItemCount = (int)((ulong)0L);
	}

	// Token: 0x060001AE RID: 430 RVA: 0x00006B28 File Offset: 0x00004D28
	[Token(Token = "0x60001AE")]
	[Address(RVA = "0xB87EF0", Offset = "0xB86EF0", VA = "0x180B87EF0")]
	private void OnLogItemAdded(LogHistoryItem logHistoryItem)
	{
		if (this.logItemCount > 40)
		{
			this.logLabel.text = "[Console Log]";
			this.logItemCount = (int)((ulong)0L);
		}
		Text text = this.logLabel;
		string text2 = text.text;
		string logMessage = logHistoryItem.LogMessage;
		string text3 = text2 + "\n" + logMessage;
		((ICanvasElement)text).GraphicUpdateComplete();
	}

	// Token: 0x060001AF RID: 431 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60001AF")]
	[Address(RVA = "0xB87510", Offset = "0xB86510", VA = "0x180B87510")]
	private void ExportLog()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060001B0 RID: 432 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60001B0")]
	[Address(RVA = "0xB87FE0", Offset = "0xB86FE0", VA = "0x180B87FE0")]
	private IEnumerator<float> Upload(BugReporter.LogObject logObject)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060001B1 RID: 433 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60001B1")]
	[Address(RVA = "0xB87D10", Offset = "0xB86D10", VA = "0x180B87D10")]
	private string GetLogObjectName()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060001B2 RID: 434 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60001B2")]
	[Address(RVA = "0xB877B0", Offset = "0xB867B0", VA = "0x180B877B0")]
	private BugReporter.LogObject GetCurrentLogObject(string logObjectName)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060001B3 RID: 435 RVA: 0x00006B88 File Offset: 0x00004D88
	[Token(Token = "0x60001B3")]
	[Address(RVA = "0xB88070", Offset = "0xB87070", VA = "0x180B88070")]
	public BugReporter()
	{
	}

	// Token: 0x0400020F RID: 527
	[Token(Token = "0x400020F")]
	private const float DELAY = 3f;

	// Token: 0x04000210 RID: 528
	[Token(Token = "0x4000210")]
	private const int LOG_LENGTH = 50;

	// Token: 0x04000211 RID: 529
	[Token(Token = "0x4000211")]
	private const int LOG_ITEM_MAXIMUM = 40;

	// Token: 0x04000212 RID: 530
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4000212")]
	[SerializeField]
	private string WebServerUrl = "";

	// Token: 0x04000213 RID: 531
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4000213")]
	[SerializeField]
	private Text logLabel;

	// Token: 0x04000214 RID: 532
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4000214")]
	private LogHistory logHistory;

	// Token: 0x04000215 RID: 533
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4000215")]
	private float timeNow;

	// Token: 0x04000216 RID: 534
	[FieldOffset(Offset = "0x34")]
	[Token(Token = "0x4000216")]
	private float timeDelay;

	// Token: 0x04000217 RID: 535
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4000217")]
	private int logItemCount;

	// Token: 0x0200003A RID: 58
	[Token(Token = "0x200003A")]
	private class LogObject
	{
		// Token: 0x060001B4 RID: 436 RVA: 0x00006BA8 File Offset: 0x00004DA8
		[Token(Token = "0x60001B4")]
		[Address(RVA = "0x36ABD0", Offset = "0x369BD0", VA = "0x18036ABD0")]
		public LogObject()
		{
		}

		// Token: 0x04000218 RID: 536
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4000218")]
		public string Name;

		// Token: 0x04000219 RID: 537
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4000219")]
		public string UpdateTime;

		// Token: 0x0400021A RID: 538
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x400021A")]
		public BugReporter.LogData[] Logs;
	}

	// Token: 0x0200003B RID: 59
	[Token(Token = "0x200003B")]
	private class LogData
	{
		// Token: 0x060001B5 RID: 437 RVA: 0x00006BBC File Offset: 0x00004DBC
		[Token(Token = "0x60001B5")]
		[Address(RVA = "0x36ABD0", Offset = "0x369BD0", VA = "0x18036ABD0")]
		public LogData()
		{
		}

		// Token: 0x0400021B RID: 539
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x400021B")]
		public string logHeader;

		// Token: 0x0400021C RID: 540
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x400021C")]
		public string logTime;

		// Token: 0x0400021D RID: 541
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x400021D")]
		public string logMsg;

		// Token: 0x0400021E RID: 542
		[FieldOffset(Offset = "0x28")]
		[Token(Token = "0x400021E")]
		public string logStackTrace;
	}
}
