using Avalonia;
using QuestPDF.Infrastructure;
namespace QuestPDF.Previewer
{
///
/// Extensions for for previewer
///
public static class DocumentPreviewerExtensions
{
///
/// Displays the document in a previewer which supports hot reloading.
///
///
/// Intended for development only. Not intended for shipping.
///
///
public static void ShowInPreviewer(this IDocument document)
{
ArgumentNullException.ThrowIfNull(document);
AppBuilder
.Configure(() => new PreviewerApp()
{
Document = document,
})
.UsePlatformDetect()
.StartWithClassicDesktopLifetime(Array.Empty());
}
}
}