using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;

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

namespace BeWo.Scheduler.Converter
{
	public class NewCalendarBackgroundConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			var employeeBrush = new SolidColorBrush(Color.FromArgb(255, 69, 153, 59));
			var customerBrush = new SolidColorBrush(Color.FromArgb(255, 59, 119, 153));
			var resourceBrush = new SolidColorBrush(Color.FromArgb(255, 4, 180, 208));

			if (value is CompactEmployeeDC || value is Employee2SchedulerAppointmentDC)
				return employeeBrush;
			if (value is CompactCustomerDC)
				return customerBrush;

			return resourceBrush;
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new NotImplementedException();
		}
	}
}