<?php

declare(strict_types=1);

namespace App\Scolarite\Infrastructure\Service;

use App\Scolarite\Application\Port\EvaluationGradesChecker;
use App\Scolarite\Domain\Model\Evaluation\EvaluationId;
use App\Scolarite\Domain\Repository\GradeRepository;
use App\Shared\Domain\Tenant\TenantId;
use Override;

final readonly class NoGradesEvaluationGradesChecker implements EvaluationGradesChecker
{
    public function __construct(
        private GradeRepository $gradeRepository,
    ) {
    }

    #[Override]
    public function hasGrades(EvaluationId $evaluationId, TenantId $tenantId): bool
    {
        return $this->gradeRepository->hasGradesForEvaluation($evaluationId, $tenantId);
    }
}
