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

namespace ZionRobot.Models.Source
{
	// Token: 0x0200002C RID: 44
	public class ActionsElement
	{
		// Token: 0x17000075 RID: 117
		// (get) Token: 0x06000133 RID: 307 RVA: 0x00007D94 File Offset: 0x00005F94
		// (set) Token: 0x06000134 RID: 308 RVA: 0x00007D9C File Offset: 0x00005F9C
		public string Name { get; set; }

		// Token: 0x17000076 RID: 118
		// (get) Token: 0x06000135 RID: 309 RVA: 0x00007DA5 File Offset: 0x00005FA5
		public List<Action> Actions { get; }

		// Token: 0x06000136 RID: 310 RVA: 0x00007DB0 File Offset: 0x00005FB0
		public ActionsElement(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: 0x06000137 RID: 311 RVA: 0x00007E44 File Offset: 0x00006044
		public XmlElement AppendTo(XmlDocument doc)
		{
			XmlElement root = doc.CreateElement("Actions");
			root.SetAttribute("Name", this.Name);
			this.Actions.ForEach(delegate(Action action)
			{
				root.AppendChild(action.AppendTo(doc));
			});
			return root;
		}
	}
}
