using System;
using System.Windows;
using System.Windows.Data;

namespace NorthwindBackend
{
	/// <summary>
	/// This converter is used to show the categories loading animation panel while 
	/// there are no categories loaded. When the categories load, the panel is hidden.
	/// </summary>
	public class VisibilityCountConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			return 0 == (int)value ? Visibility.Visible : Visibility.Collapsed;
		}

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