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

namespace AmplifyColor
{
	// Token: 0x02000624 RID: 1572
	[Token(Token = "0x2000624")]
	[Serializable]
	public class VolumeEffectComponentFlags
	{
		// Token: 0x0600314C RID: 12620 RVA: 0x0006727C File Offset: 0x0006547C
		[Token(Token = "0x600314C")]
		[Address(RVA = "0x93B8B0", Offset = "0x93A6B0", VA = "0x18093B8B0")]
		public VolumeEffectComponentFlags(string name)
		{
			/*
An exception occurred when decompiling this method (0600314C)

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

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	call:void(object::.ctor, ldloc:VolumeEffectComponentFlags[exp:object](this)); 	stfld:string(VolumeEffectComponentFlags::componentName, ldloc:VolumeEffectComponentFlags(this), ldloc:string(name)); 	stloc:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectFieldFlags>(var_0_12, newobj:List`1[exp:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectFieldFlags>](List`1::.ctor)); 	stfld:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectFieldFlags>(VolumeEffectComponentFlags::componentFields, ldloc:VolumeEffectComponentFlags(this), ldloc:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectFieldFlags>(var_0_12)); }; 
   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.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: 0x0600314D RID: 12621 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600314D")]
		[Address(RVA = "0x93B940", Offset = "0x93A740", VA = "0x18093B940")]
		public VolumeEffectComponentFlags(VolumeEffectComponent comp)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600314E RID: 12622 RVA: 0x000672A4 File Offset: 0x000654A4
		[Token(Token = "0x600314E")]
		[Address(RVA = "0x93BB00", Offset = "0x93A900", VA = "0x18093BB00")]
		public VolumeEffectComponentFlags(Component c)
		{
			Type type = c.GetType();
			if (type == 0 || type.ToString() == 0)
			{
			}
			FieldInfo[] fields = c.GetType().GetFields();
			int num = 0;
			int length = fields.Length;
			if (num < length)
			{
				FieldInfo fieldInfo = fields[num];
				if (VolumeEffectField.IsValidType(fieldInfo.FieldType.FullName))
				{
					List<VolumeEffectFieldFlags> list = this.componentFields;
					VolumeEffectFieldFlags volumeEffectFieldFlags = new VolumeEffectFieldFlags(fieldInfo);
					list.Add(volumeEffectFieldFlags);
				}
				num++;
			}
		}

		// Token: 0x0600314F RID: 12623 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600314F")]
		[Address(RVA = "0x93B620", Offset = "0x93A420", VA = "0x18093B620")]
		public void UpdateComponentFlags(VolumeEffectComponent comp)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003150 RID: 12624 RVA: 0x00067320 File Offset: 0x00065520
		[Token(Token = "0x6003150")]
		[Address(RVA = "0x93B400", Offset = "0x93A200", VA = "0x18093B400")]
		public void UpdateComponentFlags(Component c)
		{
			FieldInfo[] fields = c.GetType().GetFields();
			int num = 0;
			if (num < fields.Length)
			{
				FieldInfo fieldInfo = fields[num];
				FieldInfo pi = fieldInfo;
				List<VolumeEffectFieldFlags> list = this.componentFields;
				Predicate<VolumeEffectFieldFlags> predicate = delegate(VolumeEffectFieldFlags s)
				{
					FieldInfo pi2 = pi;
					string fieldName = s.fieldName;
					string name = pi2.Name;
					return string.Equals(fieldName, name);
				};
				if (!list.Exists(predicate) && VolumeEffectField.IsValidType(pi.FieldType.FullName))
				{
					List<VolumeEffectFieldFlags> list2 = this.componentFields;
					VolumeEffectFieldFlags volumeEffectFieldFlags = new VolumeEffectFieldFlags(pi);
					list2.Add(volumeEffectFieldFlags);
				}
				num++;
			}
		}

		// Token: 0x06003151 RID: 12625 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003151")]
		[Address(RVA = "0x93B1D0", Offset = "0x939FD0", VA = "0x18093B1D0")]
		public string[] GetFieldNames()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003B16 RID: 15126
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4003B16")]
		public string componentName;

		// Token: 0x04003B17 RID: 15127
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003B17")]
		public List<VolumeEffectFieldFlags> componentFields;

		// Token: 0x04003B18 RID: 15128
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003B18")]
		public bool blendFlag;
	}
}
