<?php

declare(strict_types=1);

namespace App\Handler;

use App\Service\AwardeeManager;
use Psr\Container\ContainerInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Zend\Expressive\Helper\UrlHelper;
use Zend\Expressive\Template\TemplateRendererInterface;

class AwardeeHandlerFactory
{
    public function __invoke(ContainerInterface $container): RequestHandlerInterface
    {
        $template = $container->get(TemplateRendererInterface::class);
        $awardeeManager = $container->get(AwardeeManager::class);
        $urlHelper = $container->get(UrlHelper::class);
        return new AwardeeHandler($template, $awardeeManager, $urlHelper);
    }
}
