using adas_core.Application.Repositories.Interfaces;
using adas_core.Application.Services.Interfaces;
using adas_core.Domain.Models.MongoModels;

namespace adas_core.Application.Services;

/// <summary>
/// Provides services for managing archived patient data, implementing the <see cref="IArchivedPatientService"/> interface.
/// </summary>
/// <remarks>
/// This class uses an <see cref="IPatientArchiveRepository"/> to perform operations on archived patient records, following the repository pattern.
/// </remarks>
public class ArchivedPatientService(IPatientArchiveRepository archivedPatientRepository) : IArchivedPatientService
{
    /// <summary>
    /// Retrieves all archived patients by delegating to the archived patient repository.
    /// </summary>
    /// <returns>A task representing the asynchronous operation, containing a list of all archived <see cref="Patient"/> entities.</returns>
    public async Task<List<Patient>> FindAllPatients()
    {
        return await archivedPatientRepository.FindAll();
    }
}