using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Kavita.Common;
using Kavita.Models.DTOs;
using Kavita.Models.Entities.Enums;
namespace Kavita.API.Services.Reading;
public interface IReadingProfileService
{
///
/// Returns the ReadingProfile that should be applied to the given series, walks up the tree.
/// Series (Implicit) -> Series (User) -> Library (User) -> Default
///
///
///
///
///
///
///
Task GetReadingProfileDtoForSeries(int userId, int libraryId, int seriesId, int? activeDeviceId, bool skipImplicit = false);
///
/// Creates a new reading profile for a user. Name must be unique per user
///
///
///
///
Task CreateReadingProfile(int userId, UserReadingProfileDto dto);
///
/// Given an implicit profile, promotes it to a profile of kind , then removes
/// all links to the series this implicit profile was created for from other reading profiles (if the device id matches
/// if given)
///
///
///
///
///
Task PromoteImplicitProfile(int userId, int profileId, int? activeDeviceId);
///
/// Updates the implicit reading profile for a series, creates one if none exists
///
///
///
///
///
///
///
Task UpdateImplicitReadingProfile(int userId, int libraryId, int seriesId, UserReadingProfileDto dto, int? activeDeviceId);
///
/// Updates the non-implicit reading profile for the given series, and removes implicit profiles
///
///
///
///
///
///
///
Task UpdateParent(int userId, int libraryId, int seriesId, UserReadingProfileDto dto, int? activeDeviceId);
///
/// Updates a given reading profile for a user
///
///
///
///
/// Does not update connected series and libraries
Task UpdateReadingProfile(int userId, UserReadingProfileDto dto);
///
/// Deletes a given profile for a user
///
///
///
///
///
/// The default profile for the user cannot be deleted
Task DeleteReadingProfile(int userId, int profileId);
///
/// Binds the reading profile to the series, and remove the implicit RP from the series if it exists
///
///
///
///
///
Task SetSeriesProfiles(int userId, List profileIds, int seriesId);
///
/// Binds the reading profile to many series, and remove the implicit RP from the series if it exists
///
///
///
///
///
Task BulkSetSeriesProfiles(int userId, List profileIds, List seriesIds);
///
/// Remove all reading profiles bound to the series
///
///
///
///
Task ClearSeriesProfile(int userId, int seriesId);
///
/// Bind the reading profile to the library
///
///
///
///
///
Task SetLibraryProfiles(int userId, List profileIds, int libraryId);
///
/// Remove the reading profile bound to the library, if it exists
///
///
///
///
Task ClearLibraryProfile(int userId, int libraryId);
///
/// Returns the all bound Reading Profile to a Library
///
///
///
///
Task> GetReadingProfileDtosForLibrary(int userId, int libraryId);
///
/// Returns the all bound Reading Profile to a Series
///
///
///
///
Task> GetReadingProfileDtosForSeries(int userId, int seriesId);
///
/// Set the assigned devices for the given reading profile. Then removes all duplicate links, ensuring each series
/// and library only has one profile per device
///
///
///
///
///
Task SetProfileDevices(int userId, int profileId, List deviceIds);
///
/// Remove device ids from all profiles, does **NOT** commit
///
///
///
///
Task RemoveDeviceLinks(int userId, int deviceId);
}