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

namespace AmplifyColor
{
	// Token: 0x02000628 RID: 1576
	[Token(Token = "0x2000628")]
	[Serializable]
	public class VolumeEffectFlags
	{
		// Token: 0x0600315A RID: 12634 RVA: 0x000674A8 File Offset: 0x000656A8
		[Token(Token = "0x600315A")]
		[Address(RVA = "0x93DED0", Offset = "0x93CCD0", VA = "0x18093DED0")]
		public VolumeEffectFlags()
		{
			/*
An exception occurred when decompiling this method (0600315A)

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

 ---> System.Exception: Basic block has to end with unconditional control flow. 
{; 	Block_0:; 	call:void(object::.ctor, ldloc:VolumeEffectFlags[exp:object](this)); 	stloc:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectComponentFlags>(var_0_0B, newobj:List`1[exp:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectComponentFlags>](List`1::.ctor)); 	stfld:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectComponentFlags>(VolumeEffectFlags::components, ldloc:VolumeEffectFlags(this), ldloc:class [mscorlib]System.Collections.Generic.List`1<class AmplifyColor.VolumeEffectComponentFlags>(var_0_0B)); }; 
   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: 0x0600315B RID: 12635 RVA: 0x000674C8 File Offset: 0x000656C8
		[Token(Token = "0x600315B")]
		[Address(RVA = "0x93D490", Offset = "0x93C290", VA = "0x18093D490")]
		public void AddComponent(Component c)
		{
			List<VolumeEffectComponentFlags> list = this.components;
			Predicate<VolumeEffectComponentFlags> predicate = delegate(VolumeEffectComponentFlags s)
			{
				Component c3 = c;
				string componentName = s.componentName;
				Type type = c3.GetType();
				if (type == 0 || type.ToString() == 0)
				{
				}
				return string.Equals(componentName, "");
			};
			VolumeEffectComponentFlags volumeEffectComponentFlags = list.Find(predicate);
			if (volumeEffectComponentFlags == 0)
			{
				List<VolumeEffectComponentFlags> list2 = this.components;
				VolumeEffectComponentFlags volumeEffectComponentFlags2 = new VolumeEffectComponentFlags(c);
				list2.Add(volumeEffectComponentFlags2);
				return;
			}
			Component c2 = c;
			volumeEffectComponentFlags.UpdateComponentFlags(c2);
			throw new NullReferenceException();
		}

		// Token: 0x0600315C RID: 12636 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600315C")]
		[Address(RVA = "0x93DC80", Offset = "0x93CA80", VA = "0x18093DC80")]
		public void UpdateFlags(VolumeEffect effectVol)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600315D RID: 12637 RVA: 0x00067538 File Offset: 0x00065738
		[Token(Token = "0x600315D")]
		[Address(RVA = "0x93DAE0", Offset = "0x93C8E0", VA = "0x18093DAE0")]
		public static void UpdateCamFlags(AmplifyColorBase[] effects, AmplifyColorVolumeBase[] volumes)
		{
			int num = 0;
			int num2 = 0;
			int length = effects.Length;
			if (num2 < length)
			{
				AmplifyColorBase amplifyColorBase = effects[num];
				VolumeEffectFlags volumeEffectFlags = new VolumeEffectFlags();
				List<VolumeEffectComponentFlags> list = new List();
				volumeEffectFlags.components = list;
				amplifyColorBase.EffectFlags = volumeEffectFlags;
				int num3 = 0;
				if (num3 < volumes.Length)
				{
					VolumeEffect volumeEffect = volumes[num3].EffectContainer.FindVolumeEffect(amplifyColorBase);
					if (volumeEffect != 0)
					{
						amplifyColorBase.EffectFlags.UpdateFlags(volumeEffect);
					}
					num3++;
				}
				num++;
			}
		}

		// Token: 0x0600315E RID: 12638 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600315E")]
		[Address(RVA = "0x93D6F0", Offset = "0x93C4F0", VA = "0x18093D6F0")]
		public VolumeEffect GenerateEffectData(AmplifyColorBase go)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600315F RID: 12639 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x600315F")]
		[Address(RVA = "0x93D600", Offset = "0x93C400", VA = "0x18093D600")]
		public VolumeEffectComponentFlags FindComponentFlags(string compName)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06003160 RID: 12640 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6003160")]
		[Address(RVA = "0x93D8B0", Offset = "0x93C6B0", VA = "0x18093D8B0")]
		public string[] GetComponentNames()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x04003B1E RID: 15134
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x4003B1E")]
		public List<VolumeEffectComponentFlags> components;
	}
}
