using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using DynamicData.Binding;
using StabilityMatrix.Avalonia.Models;
using StabilityMatrix.Core.Inference;
using StabilityMatrix.Core.Models;
using StabilityMatrix.Core.Models.Api.Comfy;
using StabilityMatrix.Core.Models.FileInterfaces;
namespace StabilityMatrix.Avalonia.Services;
public interface IInferenceClientManager : IDisposable, INotifyPropertyChanged, INotifyPropertyChanging
{
ComfyClient? Client { get; set; }
///
/// Whether the client is connected
///
[MemberNotNullWhen(true, nameof(Client))]
bool IsConnected { get; }
///
/// Whether the client is connecting
///
bool IsConnecting { get; }
///
/// Whether the user can initiate a connection
///
bool CanUserConnect { get; }
///
/// Whether the user can initiate a disconnection
///
bool CanUserDisconnect { get; }
IObservableCollection Models { get; }
IObservableCollection VaeModels { get; }
IObservableCollection ControlNetModels { get; }
IObservableCollection PromptExpansionModels { get; }
IObservableCollection Samplers { get; }
IObservableCollection Upscalers { get; }
IObservableCollection Schedulers { get; }
Task CopyImageToInputAsync(FilePath imageFile, CancellationToken cancellationToken = default);
Task UploadInputImageAsync(ImageSource image, CancellationToken cancellationToken = default);
Task WriteImageToInputAsync(ImageSource imageSource, CancellationToken cancellationToken = default);
Task ConnectAsync(CancellationToken cancellationToken = default);
Task ConnectAsync(PackagePair packagePair, CancellationToken cancellationToken = default);
Task CloseAsync();
}