<?php

declare(strict_types=1);

namespace App\Handler;

use App\Service\JudgeManager;
use Psr\Container\ContainerInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Zend\Expressive\Template\TemplateRendererInterface;

class JudgesHandlerFactory
{
    public function __invoke(ContainerInterface $container) : RequestHandlerInterface
    {
        $template = $container->get(TemplateRendererInterface::class);
        $judgeManager = $container->get(JudgeManager::class);
        return new JudgesHandler($template, $judgeManager);
    }
}
