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

namespace ZionRobot.Models.Source
{
	// Token: 0x02000023 RID: 35
	public class BlockElement
	{
		// Token: 0x17000053 RID: 83
		// (get) Token: 0x060000E7 RID: 231 RVA: 0x0000691A File Offset: 0x00004B1A
		// (set) Token: 0x060000E8 RID: 232 RVA: 0x00006922 File Offset: 0x00004B22
		public string Name { get; set; }

		// Token: 0x17000054 RID: 84
		// (get) Token: 0x060000E9 RID: 233 RVA: 0x0000692B File Offset: 0x00004B2B
		// (set) Token: 0x060000EA RID: 234 RVA: 0x00006933 File Offset: 0x00004B33
		public List<Action> Actions { get; set; }

		// Token: 0x060000EB RID: 235 RVA: 0x0000693C File Offset: 0x00004B3C
		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: 0x060000EC RID: 236 RVA: 0x000069DC File Offset: 0x00004BDC
		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: 0x04000058 RID: 88
		private string mainTag = "Block";
	}
}
