using MangaReader.WinUI.ViewModels;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System.Threading.Tasks;

namespace MangaReader.WinUI.Views;

public sealed partial class LibraryView : Page
{
    private readonly LibraryViewModel viewModel;

    public LibraryView()
    {
        InitializeComponent();

        viewModel = (LibraryViewModel)DataContext;
    }

    private void Page_Loaded(object sender, RoutedEventArgs e)
    {
        Task.Run(viewModel.SearchAsync);
    }
}