using BookReader.ViewModels;

namespace BookReader.Views;

public partial class CalibreLibraryPage : ContentPage
{
    private readonly CalibreLibraryViewModel _viewModel;

    public CalibreLibraryPage(CalibreLibraryViewModel viewModel)
    {
        InitializeComponent();
        _viewModel = viewModel;
        BindingContext = viewModel;
    }

    protected override async void OnAppearing()
    {
        base.OnAppearing();
        await _viewModel.InitializeCommand.ExecuteAsync(null);
    }
}
