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

namespace AmplifyColor
{
	// Token: 0x0200067C RID: 1660
	[Token(Token = "0x200067C")]
	[Serializable]
	public class VolumeEffectComponentFlags
	{
		// Token: 0x06003415 RID: 13333 RVA: 0x0006E43C File Offset: 0x0006C63C
		[Token(Token = "0x6003415")]
		[Address(RVA = "0x4B58B0", Offset = "0x4B48B0", VA = "0x1804B58B0")]
		public VolumeEffectComponentFlags(string name)
		{
			/*
An exception occurred when decompiling this method (06003415)

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: 0x06003416 RID: 13334 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003416")]
		[Address(RVA = "0x4B5940", Offset = "0x4B4940", VA = "0x1804B5940")]
		public VolumeEffectComponentFlags(VolumeEffectComponent comp)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003417 RID: 13335 RVA: 0x0006E464 File Offset: 0x0006C664
		[Token(Token = "0x6003417")]
		[Address(RVA = "0x4B5B00", Offset = "0x4B4B00", VA = "0x1804B5B00")]
		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: 0x06003418 RID: 13336 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003418")]
		[Address(RVA = "0x4B5620", Offset = "0x4B4620", VA = "0x1804B5620")]
		public void UpdateComponentFlags(VolumeEffectComponent comp)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003419 RID: 13337 RVA: 0x0006E4E0 File Offset: 0x0006C6E0
		[Token(Token = "0x6003419")]
		[Address(RVA = "0x4B5400", Offset = "0x4B4400", VA = "0x1804B5400")]
		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: 0x0600341A RID: 13338 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600341A")]
		[Address(RVA = "0x4B51D0", Offset = "0x4B41D0", VA = "0x1804B51D0")]
		public string[] GetFieldNames()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003E00 RID: 15872
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4003E00")]
		public string componentName;

		// Token: 0x04003E01 RID: 15873
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003E01")]
		public List<VolumeEffectFieldFlags> componentFields;

		// Token: 0x04003E02 RID: 15874
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003E02")]
		public bool blendFlag;
	}
}
