using System;
using System.Threading;
using System.Threading.Tasks;
using FootwearTest.Models;

namespace FootwearTest.Services;

public interface IDeviceClient
{
    bool IsConnected { get; }
    string ConnectionText { get; }
    DeviceSnapshot LastSnapshot { get; }
    event EventHandler<DeviceSnapshot>? SnapshotUpdated;

    Task ConnectAsync(CancellationToken cancellationToken = default);
    Task DisconnectAsync(CancellationToken cancellationToken = default);
    Task<DeviceSnapshot> ReadSnapshotAsync(CancellationToken cancellationToken = default);
    Task SetOutputsAsync(bool pumpRunning, bool fanRunning, bool heaterRunning, CancellationToken cancellationToken = default);
}
