<?php
namespace Claromentis\Core\Psr7Bridge;

$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] ?: array()) + array("_904e924" . "49df3b63" . "f01a2394" . "ad3579ca" . "a" => base64_decode("Q2xhcm9tZW50aXNcQ29yZVxIdHRwXFJl" . "cXVlc3Q="), "reques" . "t" => base64_decode("cmVxdWVz" . "dA=="), "_d58d9d29845f0d3d62e53f" . "8e87260f39" => base64_decode("cHNyNy" . "5wc3Jf" . "ZmFjdG" . "9yeQ=="));
use Claromentis\Core\Application;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\HttpFoundation\Response as SymfonyResponse;






class Psr7ArgumentResolver implements ArgumentValueResolverInterface
{
    
    
    
    
    protected $app;
    
    
    
    
    
    
    public function __construct(Application $app)
    {
        $this->app = $app;
    }
    public function supports(Request $request, ArgumentMetadata $argument)
    {
        return $argument->getType() === ServerRequestInterface::class || $argument->getType() === $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_904e92449" . "df3b63f01a" . "2394ad3579" . "caa"] || $argument->getType() === ResponseInterface::class;
    }
    public function resolve(Request $request, ArgumentMetadata $argument)
    {
        if ($argument->getType() === ServerRequestInterface::class || $argument->getType() === $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_904e924" . "49df3b63" . "f01a2394" . "ad3579ca" . "a"]) {
            
            
            $_8b79b28f167037ff45748e4e09c3af32 = $this->app[$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["re" . "qu" . "es" . "t"]];
            foreach ($request->attributes->all() as $key => $value) {
                $_8b79b28f167037ff45748e4e09c3af32 = $_8b79b28f167037ff45748e4e09c3af32->withAttribute($key, $value);
            }
            (yield $_8b79b28f167037ff45748e4e09c3af32);
        } elseif ($argument->getType() === ResponseInterface::class) {
            $_271710fce14822faef178463d03cd46e = $this->app[$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_d58d9d29845f0d3d62e53f8e8" . "7260f39"]]->createResponse(new SymfonyResponse());
            (yield $_271710fce14822faef178463d03cd46e);
        } else {
            (yield null);
        }
    }
}