using System.Collections.Generic;
using System.ComponentModel;
using Hitsuji.Framework.DataClient.Model;
using PostCardHitsuji.DataClient.DAO;
using Hitsuji.Framework.Utils;

namespace PostCardHitsuji.DataClient.Model
{
    public class MappingLayoutContentModel : BaseContentModel, IDaoContentModel
    {
        public MappingLayoutContentModel()
        {
            personModel_ = new PersonContentModel(PersonContentModel.PersonTypes.Reseiver);
        }
        
        public string layoutId
        {
            get;
            set;
        }

        public PersonContentModel PersonModel
        {
            get { return personModel_; }
            set { personModel_ = value; }
        }
        private PersonContentModel personModel_;

        public IllustLayoutContentModel LayoutModel
        {
            get { return layoutModel_; }
            set { layoutModel_ = value; }
        }
        private IllustLayoutContentModel layoutModel_;

        /// <summary>
        /// mappingLayoutId
        /// </summary>
        public string mappingLayoutId
        {
            get { return mappingLayoutId_; }
            set
            {
                mappingLayoutId_ = ValueUtil.tryGetString(value, "");
            }
        }
        private string mappingLayoutId_;

        protected override void onBasePropertyChanged(string propertyName, object oldValue, object newValue)
        {
            //throw new System.NotImplementedException();
        }

        public override List<AbsoluteDataResult> IsAbsoluteData()
        {
            throw new System.NotImplementedException();
        }

        public override IContentModel DeepCopy()
        {
            var model = new MappingLayoutContentModel();
            model.Id = this.Id;
            model.Enable = this.Enable;
            model.PersonModel = this.personModel_;
            model.mappingLayoutId = this.mappingLayoutId_;

            return model;
        }
    }
}
