<?php

declare(strict_types=1);

namespace App\Repository\Contract;

use App\Entity\Employee;
use App\Entity\WorkHour;
use DateTimeImmutable;
use DateTimeInterface;

interface WorkHourReadRepositoryInterface
{
    /**
     * @param list<Employee> $employees
     *
     * @return list<WorkHour>
     */
    public function findByDateRangeAndEmployees(DateTimeImmutable $from, DateTimeImmutable $to, array $employees): array;

    /**
     * @param list<Employee> $employees
     *
     * @return array<int, WorkHour>
     */
    public function findByDateAndEmployeesIndexedByEmployeeId(DateTimeImmutable $workDate, array $employees): array;

    public function findOneByEmployeeAndDate(Employee $employee, DateTimeInterface $date): ?WorkHour;

    public function hasValidatedInRange(Employee $employee, DateTimeInterface $from, DateTimeInterface $to): bool;

    public function hasSiteValidatedInRange(Employee $employee, DateTimeInterface $from, DateTimeInterface $to): bool;
}
