using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

using BeWo.Scheduler.Resources;
using BeWo.Scheduler.View;
using BeWo.ViewModel.ListViewModel;

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

using DevExpress.Xpf.Scheduler;
using DevExpress.XtraScheduler;

namespace BeWo.Scheduler.ViewModel
{
	public class NewSchedulerAppointmentListVM : AbstractDCListMapperVM<NewSchedulerAppointmentDC, NewSchedulerAppointmentVM>, ISchedulerViewModel
	{
		public SchedulerSettings GetDefaultSchedulerSettings()
		{
			var settings = new SchedulerSettings(AppointmentKind.General, AppointmentViewType.WorkWeek);
			return settings;
		}

		public BindingList<IBeWoAppointment> Appointments { get; private set; }
		public IList<BeWoAppointmentCategory> Categories { get; private set; }
		public IList<IBeWoAppointmentResource> Resources { get; private set; }
		public Dictionary<Guid, Dictionary<string, Dictionary<string, object>>> ChangedOccurencyCustomFields { get; private set; }
		public object SelectedFilterObject { get; set; }

		public NewSchedulerAppointmentListVM(IEnumerable<NewSchedulerAppointmentDC> appList)
		{
			InitViewModel();

			InitChangedOccurrencyCustomFields(appList.Where(t => t.Type == 3).ToList());
		}

		private void InitViewModel()
		{
			
		}

		public void SaveAppointments(SchedulerControl control, IEnumerable<Appointment> list)
		{
			throw new NotImplementedException();
		}

		public void DeleteAppointments(SchedulerControl control, IEnumerable<Appointment> list)
		{
			throw new NotImplementedException();
		}

		public void InsertNewAppointments(SchedulerControl control, IEnumerable<Appointment> list)
		{
			throw new NotImplementedException();
		}

		public AbstractAppointmentEditForm GetEditAppointmentForm(SchedulerControl control, Appointment appointment)
		{
			throw new NotImplementedException();
		}

		public void AddCustomFieldsMapping(SchedulerStorage schedulerStorage)
		{
			throw new NotImplementedException();
		}

		public void InitNewAppointment(Appointment appointment)
		{
			throw new NotImplementedException();
		}

		public bool FilterAppointment(string filterCategory, object selectedObject, Appointment appointment, TimeInterval interval = null)
		{
			throw new NotImplementedException();
		}

		public void InitChangedOccurrencyCustomFields<T>(IEnumerable<T> appList) where T : IDataContract
		{
			throw new NotImplementedException();
		}
	}
}
