#nullable enable
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;

namespace Hohoema.Views.Converters;

public class InvertVisibilityConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, string language)
    {
        if (value is Visibility)
        {
            var visible = (Visibility)value;
            return visible == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
        }

        return value;
    }

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