<?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/FormBundle/Views/Builder/script.html.php */
class __TwigTemplate_51dc7f8a2bdb05b85e291d43bb942bf452502b9217ea9d401f6599280f7c3c73 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

/*
 * @copyright   2014 Mautic Contributors. All rights reserved
 * @author      Mautic
 *
 * @link        http://mautic.org
 *
 * @license     GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */

\$scriptSrc = \$view['assets']->getUrl('media/js/'.('dev' == \$app->getEnvironment() ? 'mautic-form-src.js' : 'mautic-form.js'), null, null, true);
\$scriptSrc = str_replace('/index_dev.php', '', \$scriptSrc);
?>

<script type=\"text/javascript\">
    /** This section is only needed once per page if manually copying **/
    if (typeof MauticSDKLoaded == 'undefined') {
        var MauticSDKLoaded = true;
        var head            = document.getElementsByTagName('head')[0];
        var script          = document.createElement('script');
        script.type         = 'text/javascript';
        script.src          = '<?php echo \$scriptSrc; ?>';
        script.onload       = function() {
            MauticSDK.onLoad();
        };
        head.appendChild(script);
        var MauticDomain = '<?php echo str_replace('/index_dev.php', '', \$view['assets']->getBaseUrl()); ?>';
        var MauticLang   = {
            'submittingMessage': \"<?php echo \$view['translator']->trans('mautic.form.submission.pleasewait'); ?>\"
        }
    }else if (typeof MauticSDK != 'undefined') {
        MauticSDK.onLoad();
    }
</script>
";
    }

    public function getTemplateName()
    {
        return "@bundles/FormBundle/Views/Builder/script.html.php";
    }

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

    public function getSourceContext()
    {
        return new Source("", "@bundles/FormBundle/Views/Builder/script.html.php", "/var/www/mautic/app/bundles/FormBundle/Views/Builder/script.html.php");
    }
}
