using System;
using System.Collections.Generic;
using NexusReader.Application.DTOs.User;

namespace NexusReader.UI.Shared.Services;

public class LibraryStateService : ILibraryStateService
{
    private List<LastReadBookDto>? _ownedBooks;

    public List<LastReadBookDto>? OwnedBooks
    {
        get => _ownedBooks;
        set
        {
            _ownedBooks = value;
            NotifyBooksChanged();
        }
    }

    public event Action? OnBooksChanged;

    public void NotifyBooksChanged()
    {
        OnBooksChanged?.Invoke();
    }
}
