using System.Collections.Generic;

using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;

namespace BeWo.ViewModel.ListViewModel
{
    public class ValueListEntryListVM : AbstractDCListMapperVM<ValueListEntryDC, ValueListEntryVM>
    {
        public static string PropertyName_EntryType = "EntryType";

        public static string PropertyName_HeaderText = "HeaderText";

        private readonly ValueListEntryType _EntryType;

        private readonly string _HeaderText;

        public ValueListEntryListVM(ValueListEntryType pType, List<ValueListEntryDC> pDCs) : base(pDCs)
        {
            _EntryType = pType;
            _HeaderText = EnumTranslations.ValueListEntryType2Header[pType];
        }

        public ValueListEntryType EntryType
        {
            get { return _EntryType; }
        }

        public string HeaderText
        {
            get { return _HeaderText; }
        }

        protected override ValueListEntryVM CreateVM(ValueListEntryDC pDC)
        {
            var lVM = base.CreateVM(pDC);
            lVM.Type = _EntryType;
            return lVM;
        }
    }
}