using BookReader.Models;
using System.Net;
using static Android.Provider.CallLog;

namespace BookReader.Services;

public interface IDatabaseService
{
    Task InitializeAsync();

    // Books
    Task<List<Book>> GetAllBooksAsync();
    Task<Book?> GetBookByIdAsync(int id);
    Task<int> SaveBookAsync(Book book);
    Task<int> UpdateBookAsync(Book book);
    Task<int> DeleteBookAsync(Book book);

    // Settings
    Task<string?> GetSettingAsync(string key);
    Task SetSettingAsync(string key, string value);
    Task<Dictionary<string, string>> GetAllSettingsAsync();

    // Reading Progress
    Task SaveProgressAsync(ReadingProgress progress);
    Task<ReadingProgress?> GetLatestProgressAsync(int bookId);
}