//
// Copyright (c) PlaceholderCompany. All rights reserved.
//
namespace MediaBrowser.Controller.Persistence;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Entities;
///
/// Interface IChapterRepository.
///
public interface IChapterRepository
{
///
/// Deletes the chapters.
///
/// The item.
/// The cancellation token.
/// Task.
Task DeleteChaptersAsync(Guid itemId, CancellationToken cancellationToken);
///
/// Saves the chapters asynchronously.
///
/// The item.
/// The set of chapters.
/// The cancellation token.
/// A task representing the asynchronous operation.
Task SaveChaptersAsync(Guid itemId, IReadOnlyList chapters, CancellationToken cancellationToken = default);
///
/// Gets all chapters associated with the baseItem asynchronously.
///
/// The BaseItems id.
/// The cancellation token.
/// A readonly list of chapter instances.
Task> GetChaptersAsync(Guid baseItemId, CancellationToken cancellationToken = default);
///
/// Gets a single chapter of a BaseItem on a specific index asynchronously.
///
/// The BaseItems id.
/// The index of that chapter.
/// The cancellation token.
/// A chapter instance.
Task GetChapterAsync(Guid baseItemId, int index, CancellationToken cancellationToken = default);
}