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

using BeWo.Core;

namespace BeWo.Converter
{
    public class DownloadURLConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
                return null;
            return BeWoWpfUtils.GetHTMLEncodedURL(BeWoApp.SiteOfOrigin + value.ToString());
        }

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