using System.Windows;

namespace PSLauncher.App.Views;

public partial class ReleaseNotesViewerDialog : Window
{
    public ReleaseNotesViewerDialog(string version, string releaseNotesMarkdown)
    {
        InitializeComponent();

        DataContext = new
        {
            Title = $"Notes de version — v{version}",
            ReleaseNotesDocument = MarkdownTheming.BuildThemedDocument(releaseNotesMarkdown)
        };
    }

    private void OnClose(object sender, RoutedEventArgs e)
    {
        DialogResult = false;
        Close();
    }
}
