<?php
namespace Claromentis\Core\Config\Subscriber;

$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"] ?: array()) + array("_d107089ffe9b54990d00c" . "071c70e875e" => base64_decode("b25Mb2dpblBhZ2V" . "TaG93"), "_cefb8140814c2ddd69cf240d" . "1e4f97d1" => base64_decode("cm9ib3RzL" . "nZpc2libG" . "U="), "_f73dab606630b388645c4f7d3" . "fbb13bb" => base64_decode("YXJyYXlfbWVyZ" . "2U="), "_8e5ddad5a3646b" . "3ab56db26372867" . "368" => base64_decode("Y2ZnX2FsbG93X3NpdGVfa" . "W5kZXhpbmc="), "_f2f593a5ab746333" . "c00a0ad74f7ccdfd" => base64_decode("Y29yZS5sb2dpbl" . "9wYWdlX3Nob3c="), "_4c05b95d6bb1191967" . "ccfe58bffbbd86" => base64_decode("b25LZXJuZW" . "xWaWV3"));
use Claromentis\Core\Config\Config;
use Claromentis\Core\Http\TemplaterCallResponse;
use Claromentis\Core\Login\LoginPageShowEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\ViewEvent;
use Symfony\Component\HttpKernel\KernelEvents;






class RenderSubscriber implements EventSubscriberInterface
{
    protected Config $config;
    public static function getSubscribedEvents() : array
    {
        return [KernelEvents::VIEW => $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_4c05b95d6bb1191967ccfe58bffb" . "bd86"], $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_f2f593a5ab746333c00a0" . "ad74f7ccdfd"] => $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_d107089ffe" . "9b54990d00c" . "071c70e875e"]];
    }
    public function __construct(Config $config)
    {
        $this->config = $config;
    }
    
    
    
    
    
    
    
    public function onKernelView(ViewEvent $event) : void
    {
        $_1f24efd4735b7a11b391147435e7d35d = $event->getControllerResult();
        if ($_1f24efd4735b7a11b391147435e7d35d instanceof TemplaterCallResponse) {
            $this->addConfigTemplaterArgs($_1f24efd4735b7a11b391147435e7d35d->args);
        }
    }
    
    
    
    
    
    
    
    public function onLoginPageShow(LoginPageShowEvent $event) : void
    {
        $this->addConfigTemplaterArgs($event->args);
    }
    
    
    
    
    
    
    
    protected function addConfigTemplaterArgs(array &$args) : void
    {
        $args = $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_f73dab606630b3" . "88645c4f7d3fbb1" . "3bb"]($args, [$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_cefb8140814c2ddd69cf240" . "d1e4f97d1"] => (bool) $this->config->get($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_8e5ddad" . "5a3646b3" . "ab56db26" . "37286736" . "8"])]);
    }
}