// 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.Collections.ObjectModel;
using System.Threading;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Input;
using OwlCore.Provisos;
using StrixMusic.Sdk.AppModels;
using StrixMusic.Sdk.BaseModels;
namespace StrixMusic.Sdk.ViewModels
{
///
/// An interfaced ViewModel for .
/// This is needed so because multiple view models implement ,
/// and the UI needs to create controls that handle only the ViewModels properties for an .
///
public interface IAlbumCollectionViewModel : ISdkViewModel, IAlbumCollection, IPlayableCollectionViewModel, IImageCollectionViewModel, IUrlCollectionViewModel, IAsyncInit
{
///
/// The albums in this collection.
///
public ObservableCollection Albums { get; }
///
/// Keeps the default album collection while sorting.
///
public ObservableCollection UnsortedAlbums { get; }
///
/// The type of sorting used for .
///
public AlbumSortingType CurrentAlbumSortingType { get; }
///
/// The direction to sort .
///
public SortDirection CurrentAlbumSortingDirection { get; }
///
/// Populates the next set of albums into the collection.
///
/// The number of items to load.
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
public Task PopulateMoreAlbumsAsync(int limit, CancellationToken cancellationToken = default);
///
/// Sorts the track collection by .
///
/// The by which to sort.
/// The direction by which to sort.
public void SortAlbumCollection(AlbumSortingType albumSorting, SortDirection sortDirection);
///
/// Loads the entire collection of s and ensures all sources are merged.
///
/// A representing the asynchronous operation.
public Task InitAlbumCollectionAsync(CancellationToken cancellationToken = default);
///
/// Initializes the list of the .
///
public IAsyncRelayCommand InitAlbumCollectionAsyncCommand { get; }
///
///
///
public IAsyncRelayCommand PopulateMoreAlbumsCommand { get; }
///
///
///
public IAsyncRelayCommand PlayAlbumCollectionAsyncCommand { get; }
///
/// Plays a single album from this album collection.
///
public IAsyncRelayCommand PlayAlbumAsyncCommand { get; }
///
///
///
public IAsyncRelayCommand PauseAlbumCollectionAsyncCommand { get; }
///
/// Sorts the collection with a new type.
///
public IRelayCommand ChangeAlbumCollectionSortingTypeCommand { get; }
///
/// Sorts the collection with a new direction.
///
public IRelayCommand ChangeAlbumCollectionSortingDirectionCommand { get; }
}
}