// 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;
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 IImageCollectionViewModel : ISdkViewModel, IImageCollection, IAsyncInit
{
///
/// The images in this collection.
///
public ObservableCollection Images { get; }
///
/// Populates the next set of images 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 PopulateMoreImagesAsync(int limit, CancellationToken cancellationToken = default);
///
///
///
public IAsyncRelayCommand PopulateMoreImagesCommand { get; }
///
/// Loads the entire collection of s and ensures all sources are merged.
///
/// A representing the asynchronous operation.
public Task InitImageCollectionAsync(CancellationToken cancellationToken = default);
///
/// Initializes the list of the .
///
public IAsyncRelayCommand InitImageCollectionAsyncCommand { get; }
}
}