// Copyright (c) Arlo Godfrey. All Rights Reserved.
// Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms.
// See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information.
using System;
using System.Threading;
using System.Threading.Tasks;
namespace StrixMusic.Sdk.BaseModels
{
///
/// A collection of s and the properties and methods for using and manipulating them.
///
public interface IPlayableCollectionGroupChildrenBase : IPlayableCollectionBase, IAsyncDisposable
{
///
/// Attempts to play the playable collection. Resumes if paused.
///
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task PlayPlayableCollectionGroupAsync(CancellationToken cancellationToken = default);
///
/// Attempts to play the playable collection. Resumes if paused.
///
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task PausePlayableCollectionGroupAsync(CancellationToken cancellationToken = default);
///
/// The total number of available Children.
///
int TotalChildrenCount { get; }
///
/// Removes the child from the collection on the backend.
///
/// The index of the child to remove.
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task RemoveChildAsync(int index, CancellationToken cancellationToken = default);
///
/// Checks if the backend supports adding an at a specific index.
///
/// A representing the asynchronous operation. If value is true, an item can be added.
Task IsAddChildAvailableAsync(int index, CancellationToken cancellationToken = default);
///
/// Checks if the backend supports removing an at a specific index.
///
/// A representing the asynchronous operation. If value is true, the item can be removed.
Task IsRemoveChildAvailableAsync(int index, CancellationToken cancellationToken = default);
///
/// Fires when the merged changes.
///
event EventHandler? ChildrenCountChanged;
}
}