using Inspectron.HawkEye.View;
using VisionBuilder.UI.Common;
using VisionBuilder.UI.Common.ViewModel;
using VisionBuilder.UI.Common.ViewModel.Interfaces.UI;

namespace VisionBuilder.UI.Windows.Settings;

public class WindowsImagePreviewService: IImagePreviewService
{
    
    public WindowsImagePreviewService()
    {
    
    }

    public ImagePreview? CurrentWindow { get; private set; }
    public Task ShowImagePreviewAsync(ErrorPreviewVM errorPreviewVm)
    {
        var window = new ImagePreview();
        window.SetViewModel(errorPreviewVm);
        CurrentWindow = window;
        window.ShowDialog();
        CurrentWindow = null;
        return Task.CompletedTask;
    }
}