using System;
using System.Collections.Generic;
using System.Xml;

namespace ZionRobot.Models.Source
{
	// Token: 0x0200002D RID: 45
	public class BlockElement
	{
		// Token: 0x17000077 RID: 119
		// (get) Token: 0x06000138 RID: 312 RVA: 0x00007EAE File Offset: 0x000060AE
		// (set) Token: 0x06000139 RID: 313 RVA: 0x00007EB6 File Offset: 0x000060B6
		public string Name { get; set; }

		// Token: 0x17000078 RID: 120
		// (get) Token: 0x0600013A RID: 314 RVA: 0x00007EBF File Offset: 0x000060BF
		// (set) Token: 0x0600013B RID: 315 RVA: 0x00007EC7 File Offset: 0x000060C7
		public List<Action> Actions { get; set; }

		// Token: 0x0600013C RID: 316 RVA: 0x00007ED0 File Offset: 0x000060D0
		public BlockElement(XmlElement node)
		{
			this.Name = node.GetAttribute("Name");
			this.Actions = new List<Action>();
			foreach (object obj in node.SelectNodes("Action"))
			{
				XmlElement action = (XmlElement)obj;
				this.Actions.Add(new Action(action));
			}
		}

		// Token: 0x0600013D RID: 317 RVA: 0x00007F70 File Offset: 0x00006170
		public XmlElement AppendTo(XmlDocument doc)
		{
			XmlElement root = doc.CreateElement(this.mainTag);
			root.SetAttribute("Name", this.Name);
			this.Actions.ForEach(delegate(Action action)
			{
				root.AppendChild(action.AppendTo(doc));
			});
			return root;
		}

		// Token: 0x04000072 RID: 114
		private string mainTag = "Block";
	}
}
