using System.Collections.Generic;
using System.ComponentModel;
using System.Xml.Serialization;

namespace BallotTemplates
{
    public class BallotTemplatePageInside : BallotTemplatePageAbstract
    {

        
        
        
        public BallotTemplatePageInside()
        {
            TextFields = new List<TextField>();
        }

        
        
        
        [Browsable(false)]
        [XmlElement("blankRegion")]
        public BlankRegion BlankRegion { get; set; } = new BlankRegion { Id = "BlankRegion" };

        
        
        
        [XmlAttribute("typeId")]
        public string TypeId { get; set; }

        
        
        
        [XmlElement("textField", Type = typeof(TextField))]
        public List<TextField> TextFields { get; }

        
        
        
        [XmlElement("affiliationSelectionFields", Type = typeof(AffiliationSelectionFields))]
        public AffiliationSelectionFields AffiliationSelectionFields { get; set; } = new AffiliationSelectionFields();


        private ChangeFields _renumberingFields = new ChangeFields { Type = ChangeFieldType.Renumbering };

        
        
        
        [XmlElement("renumberingFields", Type = typeof(ChangeFields))]
        public ChangeFields RenumberingFields
        {
            get => _renumberingFields;
            set { value.Type = ChangeFieldType.Renumbering;
                _renumberingFields = value;
            }
        } 


        private ChangeFields _strikeoutFields = new ChangeFields { Type = ChangeFieldType.Strikeout };
        
        
        
        [XmlElement("strikeoutFields", Type = typeof(ChangeFields))]
        
        public ChangeFields StrikeoutFields
        {
            get => _strikeoutFields;
            set { value.Type = ChangeFieldType.Strikeout;
                _strikeoutFields = value;
            }
        } 


        
        
        
        [XmlElement("personVoteFields", Type = typeof(PersonVoteFields))]
        public PersonVoteFields PersonVoteFields { get; set; } = new PersonVoteFields();

    }
}
