using System.Collections.Generic;

using BS.Shared.DataContracts;

namespace BeWo.ViewModel.ListViewModel
{
	public class AbsenceTimeListVM : AbstractDCListMapperVM<AbsenceTimeDC, AbsenceTimeVM>
	{
		public static string PropertyName_PossibleReasons = "PossibleReasons";

		private List<AbsenceReasonDC> _PossibleReasons;

		public AbsenceTimeListVM(IEnumerable<AbsenceTimeDC> pAbsenceTimes, List<AbsenceReasonDC> pPossibleReasons) : base(pAbsenceTimes)
		{
			_PossibleReasons = pPossibleReasons;
		}

		public List<AbsenceReasonDC> PossibleReasons
		{
			get { return _PossibleReasons; }

			set
			{
				if (AreDifferent(_PossibleReasons, value))
				{
					_PossibleReasons = value;
					FirePropertyChanged(PropertyName_PossibleReasons);
				}
			}
		}
	}
}