using adas_core.Domain.Enums;
using adas_core.Domain.Models.Filter;
using adas_core.Domain.Models.MongoModels;
using adas_core.Domain.Models.Responses;
using MongoDB.Bson;

namespace adas_core.Application.Services.Interfaces;

public interface IRelayService
{
    Task<RelayEnum.Status> CheckRelayStatus(Relay relay);
    Task<RelayEnum.Status> CheckRelayStatus(ObjectId relayId);

    Task PowerOn(Relay relay);
    Task PowerOff(Relay relay);
    Task SetManualRelay(RelayEnum.Status status, ObjectId pocId, RelayEnum.Type type);
    Task<Relay?> GetById(ObjectId relay);
    List<Relay> GetRelayInList(List<ObjectId>? relayList);
    List<Relay> GetRelayByTypeInList(List<ObjectId>? configurationRelayList, RelayEnum.Type type);

    Task<PaginationResponse<Relay>> GetPaginatedRelays(PaginationFilter request);
    Task<Relay?> InsertRelay(Relay request);
    Task<Relay?> UpdateRelayById(ObjectId objectId, Relay relay);
}