<?php
namespace Claromentis\Core\Twig;

$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] ?: array()) + array("_6b67522fca36b32553cd09de2" . "9b97ff8" => base64_decode("dH" . "dp" . "Zw" . "=="), "_c0a3ce5e707" . "7de872cd12cd" . "a9565543f" => base64_decode("QVJ" . "HVU" . "1FT" . "lRT"), "va" . "lu" . "e" => base64_decode("dm" . "Fs" . "dW" . "U="), "attribute" . "s" => base64_decode("YXR0cmlidXRlcw" . "=="), "_f73dab606" . "630b388645" . "c4f7d3fbb1" . "3bb" => base64_decode("YXJyYXlfbW" . "VyZ2U="), "_97c03d4ccd47a186e0a2d0e14e719e" . "f5" => base64_decode("VEVNUExBVE" . "U="), "_4d707fab93be" . "bb00bbe69e815" . "9697c90" => base64_decode(""), "_f50e845669e" . "7cd06bbc643e" . "eb57aa01d" => base64_decode("Ym9keQ" . "=="));
use Claromentis\Core\Templater\Plugin\TagPluginInterface;
use Claromentis\Core\Twig\Events\TwigPreRenderEvent;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Twig;




class TwigTagPlugin implements TagPluginInterface
{
    
    
    
    
    protected $twig;
    
    
    
    
    protected $dispatcher;
    
    
    
    
    
    
    
    public function __construct(Twig\Environment $_6b67522fca36b32553cd09de29b97ff8, EventDispatcherInterface $_b497ce6f2af10f67516aed0ecf34d8cf)
    {
        $this->twig = $_6b67522fca36b32553cd09de29b97ff8;
        $this->dispatcher = $_b497ce6f2af10f67516aed0ecf34d8cf;
    }
    
    
    
    
    public function GetTag()
    {
        return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_6b67522fca36b32553cd09de29b" . "97ff8"];
    }
    
    
    
    
    public function Invoke($_402209aba575baaba313d7e099faee2a)
    {
        $attributes = $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_f73dab606630b3886" . "45c4f7d3fbb13bb"]($_402209aba575baaba313d7e099faee2a[$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["attribut" . "es"]] ?? []);
        if (!isset($attributes[$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_97c03d4ccd" . "47a186e0a2d" . "0e14e719ef5"]])) {
            return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_4d707fab93bebb00bbe69e815" . "9697c90"];
        }
        $template = $attributes[$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_97c03d4ccd" . "47a186e0a2d" . "0e14e719ef5"]] ?? null;
        $arguments = $attributes[$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_c0a3ce5e7077de87" . "2cd12cda9565543f"]] ?? [];
        if (isset($_402209aba575baaba313d7e099faee2a[$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["va" . "lu" . "e"]])) {
            $arguments[$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_f50e845669e7cd06bbc" . "643eeb57aa01d"]] = $_402209aba575baaba313d7e099faee2a[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["valu" . "e"]];
        }
        $event = new TwigPreRenderEvent($template, $arguments);
        $this->dispatcher->dispatch(TwigEvents::PRE_RENDER, $event);
        $template = $event->getTemplate();
        $arguments = $event->getArguments();
        
        
        return $this->twig->render($template, $arguments);
    }
}