<?php

declare(strict_types=1);

namespace App\Module\Mail\Domain\Repository;

use App\Module\Mail\Domain\Entity\MailMessage;
use App\Module\Mail\Domain\Entity\TaskMailLink;
use App\Shared\Domain\Contract\TaskInterface;

interface TaskMailLinkRepositoryInterface
{
    /**
     * @return list<TaskMailLink>
     */
    public function findByTask(TaskInterface $task): array;

    public function findByTaskAndMessage(TaskInterface $task, MailMessage $message): ?TaskMailLink;

    /**
     * @return list<TaskMailLink>
     */
    public function findByMessage(MailMessage $message): array;
}
