<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* @bundles/LeadBundle/Event/FieldOperatorsEvent.php */
class __TwigTemplate_602d3bee3e4aeec2e654af4e3d27d20c719f62f5b8b7b677d0375c2c67491887 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "<?php

declare(strict_types=1);

namespace Mautic\\LeadBundle\\Event;

use Symfony\\Component\\EventDispatcher\\Event;

/**
 * Event that collects operators for a specific field.
 */
final class FieldOperatorsEvent extends Event
{
    private string \$type;

    private string \$field;

    /**
     * @var array<string,string>
     */
    private array \$operators;

    /**
     * @var array<string,array<string,string>>
     */
    private array \$allOperators;

    /**
     * \$allOperators example:
     * [
     *      '=' => [
     *          'label' => 'equals',
     *          'expr' => 'eq',
     *          'negate_expr' => 'neq',
     *      ],
     *      '!=' => [
     *          'label' => 'not equal',
     *          'expr' => 'neq',
     *          'negate_expr' => 'eq',
     *      ],
     *  ];.
     *
     * \$defaultOperators example:
     * [
     *      'equals' => '=',
     *      'not equal' => '!='
     * ]
     *
     * @param array<string,string>               \$defaultOperators
     * @param array<string,array<string,string>> \$allOperators
     */
    public function __construct(string \$type, string \$field, array \$allOperators, array \$defaultOperators)
    {
        \$this->type         = \$type;
        \$this->field        = \$field;
        \$this->allOperators = \$allOperators;
        \$this->operators    = \$defaultOperators;
    }

    /**
     * @return array<string,string>
     */
    public function getOperators(): array
    {
        return \$this->operators;
    }

    public function getField(): string
    {
        return \$this->field;
    }

    public function getType(): string
    {
        return \$this->type;
    }

    public function addOperator(string \$operator): void
    {
        if (isset(\$this->allOperators[\$operator])) {
            \$this->operators[\$this->allOperators[\$operator]['label']] = \$operator;
        }
    }
}
";
    }

    public function getTemplateName()
    {
        return "@bundles/LeadBundle/Event/FieldOperatorsEvent.php";
    }

    public function getDebugInfo()
    {
        return array (  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "@bundles/LeadBundle/Event/FieldOperatorsEvent.php", "/var/www/mautic/app/bundles/LeadBundle/Event/FieldOperatorsEvent.php");
    }
}
