using adas_core.Domain.Enums;
using adas_core.Domain.Models.DTO;
using adas_core.Domain.Models.Filter;
using adas_core.Domain.Models.MongoModels;
using MongoDB.Bson;
using MongoDB.Driver;

namespace adas_core.Application.Repositories.Interfaces;

public interface IUnitRepository : IMongoRepository<Unit>
{
    //Task<Unit?> FindByLocation(PatientLocation location);
    Task<Unit?> FindById(object id);

    Task<Unit?> FindByName(string section);

    //Task<Unit?> FindByPointOfCare(PointOfCare pointOfCare);
    Task<List<Unit>> GetAll();
    Task<Unit?> UpdateUnit(Unit section);
    Task<Unit?> InsertOneUnit(Unit unit);
    Task<IEnumerable<Unit>> FindByMasterListId(ObjectId id, MasterListType masterListType);
    Task<IEnumerable<Unit>> FindByMasterListId(ObjectId id);
    Task<Unit?> UpdateUnitMasterList(UpdateUnitIdListDto updateUnitListDto);
    Task<Unit?> UpdateUnitInfo(ObjectId unitId, string name, string title);
    Task<bool> UpdateConfiguration(ObjectId unitIdParsed, UnitConfiguration unitConfiguration);
    IFindFluent<Unit, Unit> GetPaginatedUnits(PaginationFilter filter);
    Task<long> CountUnitsByMasterListId(ObjectId id, MasterListType masterListType);
}