using System.Diagnostics;
using System.Windows;

namespace DragonISO.App;

/// <summary>
/// F1 cheat-sheet dialog. Lists keyboard shortcuts, file locations, and a
/// link to the public documentation. Same chromeless style as the rest of
/// the host's modal dialogs.
/// </summary>
public partial class HelpWindow : Window
{
    public HelpWindow() => InitializeComponent();

    private void OnClose(object sender, RoutedEventArgs e) => Close();

    private void OnDocsClick(object sender, RoutedEventArgs e)
    {
        try
        {
            Process.Start(new ProcessStartInfo
            {
                FileName = "https://forge.wilddragon.net/zgaetano/Dragon-ISO",
                UseShellExecute = true,
            });
        }
        catch
        {
            // Best-effort browser launch
        }
    }
}
