<?php

declare(strict_types=1);

namespace App\Module\Absence\Domain\Repository;

use App\Module\Absence\Domain\Entity\AbsenceBalance;
use App\Module\Absence\Domain\Enum\AbsenceType;
use App\Shared\Domain\Contract\UserInterface;

interface AbsenceBalanceRepositoryInterface
{
    public function findById(int $id): ?AbsenceBalance;

    /**
     * @param array<string, mixed>       $criteria
     * @param null|array<string, string> $orderBy
     *
     * @return AbsenceBalance[]
     */
    public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;

    public function findOneForPeriod(UserInterface $user, AbsenceType $type, string $period): ?AbsenceBalance;
}
