using System;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x02000212 RID: 530
[Token(Token = "0x2000212")]
public class CSVData
{
	// Token: 0x170000D5 RID: 213
	// (get) Token: 0x060014CC RID: 5324 RVA: 0x0002F1B0 File Offset: 0x0002D3B0
	[Token(Token = "0x170000D5")]
	public string AssetName
	{
		[Token(Token = "0x60014CC")]
		[Address(RVA = "0x2B4010", Offset = "0x2B2E10", VA = "0x1802B4010")]
		get
		{
			return this.assetName;
		}
	}

	// Token: 0x060014CD RID: 5325 RVA: 0x0002F1C4 File Offset: 0x0002D3C4
	[Token(Token = "0x60014CD")]
	[Address(RVA = "0x134D750", Offset = "0x134C550", VA = "0x18134D750")]
	public CSVData(string filePath)
	{
		/*
An exception occurred when decompiling this method (060014CD)

ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void CSVData::.ctor(System.String)

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	IL_21:; 	stloc:Exception(var_2_31, newobj:Exception(Exception::.ctor, call:string(string::Concat, ldstr:string("Load CSV failed: "), ldloc:string(filePath)))); }; 
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1804
   at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
   --- End of inner exception stack trace ---
   at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
   at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
*/;
	}

	// Token: 0x060014CE RID: 5326 RVA: 0x0002F204 File Offset: 0x0002D404
	[Token(Token = "0x60014CE")]
	[Address(RVA = "0x134D720", Offset = "0x134C520", VA = "0x18134D720")]
	public CSVData(TextAsset asset)
	{
		this.ConvertData(asset);
	}

	// Token: 0x060014CF RID: 5327 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014CF")]
	[Address(RVA = "0x134BD70", Offset = "0x134AB70", VA = "0x18134BD70")]
	private void ConvertData(TextAsset asset)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014D0 RID: 5328 RVA: 0x0002F220 File Offset: 0x0002D420
	[Token(Token = "0x60014D0")]
	[Address(RVA = "0x134C8C0", Offset = "0x134B6C0", VA = "0x18134C8C0")]
	private List<string[]> GetTempList(string input)
	{
		string[] array;
		do
		{
			array = new string[1];
		}
		while ("\r\n" != 0 && array == 0);
		array[0] = "\r\n";
		int num = 0;
		string[] array2 = input.Split(array, (StringSplitOptions)num);
		List<string[]> list = new List();
		Regex regex = new Regex("\"");
		int num2 = 0;
		int length = array2.Length;
		if (num2 < length)
		{
			string text = array2[num2];
			string text2 = "" + text;
			MatchCollection matchCollection = regex.Matches(text2);
			int num3 = matchCollection.Count;
			if (matchCollection < 0)
			{
				num3++;
			}
			if (num3 == 0)
			{
				char[] array3 = new char[num3 + 1];
				array3[0] = ';';
				string[] array4 = text2.Split(array3);
				list.Add(array4);
			}
			num2++;
		}
		return list;
	}

	// Token: 0x060014D1 RID: 5329 RVA: 0x0002F2EC File Offset: 0x0002D4EC
	[Token(Token = "0x60014D1")]
	[Address(RVA = "0x51C310", Offset = "0x51B110", VA = "0x18051C310")]
	public bool HasLoadDataCompleted()
	{
		return this.loadDataCompleted;
	}

	// Token: 0x060014D2 RID: 5330 RVA: 0x0002F300 File Offset: 0x0002D500
	[Token(Token = "0x60014D2")]
	[Address(RVA = "0x134C710", Offset = "0x134B510", VA = "0x18134C710")]
	public int GetRowLength()
	{
		return this.data.Length;
	}

	// Token: 0x060014D3 RID: 5331 RVA: 0x0002F320 File Offset: 0x0002D520
	[Token(Token = "0x60014D3")]
	[Address(RVA = "0x134C110", Offset = "0x134AF10", VA = "0x18134C110")]
	public int GetColumnLength()
	{
		return this.data[0].Length;
	}

	// Token: 0x060014D4 RID: 5332 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014D4")]
	[Address(RVA = "0x134BEC0", Offset = "0x134ACC0", VA = "0x18134BEC0")]
	public string[][] CopyData()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014D5 RID: 5333 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014D5")]
	[Address(RVA = "0x134C800", Offset = "0x134B600", VA = "0x18134C800")]
	public string GetString(int row, int col)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014D6 RID: 5334 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014D6")]
	[Address(RVA = "0x134C5B0", Offset = "0x134B3B0", VA = "0x18134C5B0")]
	public int GetInt(int row, int col)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014D7 RID: 5335 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014D7")]
	[Address(RVA = "0x134C2D0", Offset = "0x134B0D0", VA = "0x18134C2D0")]
	public float GetFloat(int row, int col)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014D8 RID: 5336 RVA: 0x0002F344 File Offset: 0x0002D544
	[Token(Token = "0x60014D8")]
	[Address(RVA = "0x134C000", Offset = "0x134AE00", VA = "0x18134C000")]
	public bool GetBoolean(int row, int col)
	{
		string text = this.data[row][col];
		bool flag = text != "";
		if (!flag)
		{
			return flag;
		}
		CultureInfo invariantCulture = CultureInfo.InvariantCulture;
		return int.Parse(text, invariantCulture) > 0;
	}

	// Token: 0x060014D9 RID: 5337 RVA: 0x0002F390 File Offset: 0x0002D590
	[Token(Token = "0x60014D9")]
	[Address(RVA = "0x134C730", Offset = "0x134B530", VA = "0x18134C730")]
	public string GetString(string propertyName, int index)
	{
		int num = 0;
		if (this.TryGetValue(propertyName, index, num))
		{
		}
		string text;
		this.LogError("GetString", propertyName, index, num, text);
		return "Error";
	}

	// Token: 0x060014DA RID: 5338 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014DA")]
	[Address(RVA = "0x134C4A0", Offset = "0x134B2A0", VA = "0x18134C4A0")]
	public int GetInt(string propertyName, int index)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014DB RID: 5339 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014DB")]
	[Address(RVA = "0x134C150", Offset = "0x134AF50", VA = "0x18134C150")]
	public float GetFloat(string propertyName, int index)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014DC RID: 5340 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014DC")]
	[Address(RVA = "0x134D5A0", Offset = "0x134C3A0", VA = "0x18134D5A0")]
	private bool TryGetValue(string propertyName, int index, out string content)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014DD RID: 5341 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014DD")]
	[Address(RVA = "0x134CB60", Offset = "0x134B960", VA = "0x18134CB60")]
	private void LogError(string functionName, int row, int column, string content, object value)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014DE RID: 5342 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014DE")]
	[Address(RVA = "0x134CE80", Offset = "0x134BC80", VA = "0x18134CE80")]
	private void LogError(string functionName, int row, int column, Exception exception)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060014DF RID: 5343 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60014DF")]
	[Address(RVA = "0x134D140", Offset = "0x134BF40", VA = "0x18134D140")]
	private void LogError(string functionName, string propertyName, int index, [Optional] string content, string value = "")
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x04001FF5 RID: 8181
	[Cpp2IlInjected.FieldOffset(Offset = "0x10")]
	[Token(Token = "0x4001FF5")]
	private string assetName;

	// Token: 0x04001FF6 RID: 8182
	[Cpp2IlInjected.FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4001FF6")]
	private string[][] data;

	// Token: 0x04001FF7 RID: 8183
	[Cpp2IlInjected.FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4001FF7")]
	private bool loadDataCompleted;
}
