<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;

/* @particles/get-in-touch.html.twig */
class __TwigTemplate_a7b837bb3c17faebc9663317504eac4f16306e6f22a7c2ecaada328da4cd1da2 extends \Twig\Template
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->blocks = [
            'particle' => [$this, 'block_particle'],
            'javascript_footer' => [$this, 'block_javascript_footer'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/partials/particle.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 3
        $context["attr_extra"] = "";
        // line 4
        if ($this->getAttribute(($context["particle"] ?? null), "extra", [])) {
            // line 5
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["particle"] ?? null), "extra", []));
            foreach ($context['_seq'] as $context["_key"] => $context["attributes"]) {
                // line 6
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable($context["attributes"]);
                foreach ($context['_seq'] as $context["key"] => $context["value"]) {
                    // line 7
                    $context["attr_extra"] = (((((($context["attr_extra"] ?? null) . " ") . twig_escape_filter($this->env, $context["key"])) . "=\"") . twig_escape_filter($this->env, $context["value"], "html_attr")) . "\"");
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['key'], $context['value'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attributes'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
        }
        // line 12
        $context["indentifier"] = twig_random($this->env);
        // line 1
        $this->parent = $this->loadTemplate("@nucleus/partials/particle.html.twig", "@particles/get-in-touch.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 14
    public function block_particle($context, array $blocks = [])
    {
        // line 15
        echo "    <div class=\"g-touch-toggle\">
        <a href=\"#g-touch\" data-uk-modal=\"{center:true}\">";
        // line 17
        if ($this->getAttribute(($context["particle"] ?? null), "toggleicon", [])) {
            // line 18
            echo "<span class=\"";
            echo twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "toggleicon", []));
            echo "\"></span>";
        }
        // line 21
        if ($this->getAttribute(($context["particle"] ?? null), "toggletext", [])) {
            // line 22
            echo twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "toggletext", []));
        }
        // line 24
        echo "</a>
    </div>

    <div id=\"g-touch\" class=\"uk-modal\">
        <div class=\"uk-modal-dialog\" style=\"width: ";
        // line 28
        echo twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "width", []));
        echo ";\">
            <a class=\"uk-modal-close uk-close\"></a>
            <div class=\"g-touch-contacts\">
                <div class=\"g-grid\">
                    ";
        // line 32
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["particle"] ?? null), "items", []));
        foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
            // line 33
            echo "                        ";
            $context["attr_extra_item"] = "";
            // line 34
            echo "                        ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["item"], "extra", []));
            foreach ($context['_seq'] as $context["_key"] => $context["extra"]) {
                // line 35
                echo "                            ";
                $context["attr_extra_item"] = (((((($context["attr_extra_item"] ?? null) . " ") . twig_escape_filter($this->env, twig_first($this->env, twig_get_array_keys_filter($context["extra"])))) . "=\"") . twig_escape_filter($this->env, twig_first($this->env, $this->env->getExtension('Gantry\Component\Twig\TwigExtension')->valuesFilter($context["extra"])), "html_attr")) . "\"");
                // line 36
                echo "                        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['extra'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 37
            echo "                        <div class=\"g-block";
            if ($this->getAttribute($context["item"], "class", [])) {
                echo " ";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "class", []));
            }
            echo "\" ";
            if ($this->getAttribute($context["item"], "extra", [])) {
                echo ($context["attr_extra_item"] ?? null);
            }
            echo ">
                            <div class=\"g-touch-item\">
                                ";
            // line 39
            if ($this->getAttribute($context["item"], "link", [])) {
                // line 40
                echo "                                    <a target=\"";
                echo twig_escape_filter($this->env, (($this->getAttribute($context["item"], "target", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute($context["item"], "target", []), "_parent")) : ("_parent")));
                echo "\" href=\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "link", []));
                echo "\">
                                ";
            }
            // line 42
            echo "                                ";
            if ($this->getAttribute($context["item"], "icon", [])) {
                // line 43
                echo "                                    <span class=\"g-touch-item-icon ";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "icon", []));
                echo "\"></span>
                                ";
            }
            // line 45
            echo "                                ";
            if ($this->getAttribute($context["item"], "value", [])) {
                // line 46
                echo "                                    <span class=\"g-touch-item-value\">";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "value", []));
                echo "</span>
                                ";
            }
            // line 48
            echo "                                ";
            if ($this->getAttribute($context["item"], "link", [])) {
                // line 49
                echo "                                    </a>
                                ";
            }
            // line 51
            echo "                            </div>
                        </div>
                    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 54
        echo "                </div>
            </div>

            <div class=\"g-googlemap";
        // line 57
        if ($this->getAttribute($this->getAttribute(($context["particle"] ?? null), "css", []), "class", [])) {
            echo " ";
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["particle"] ?? null), "css", []), "class", []));
        }
        echo "\" ";
        if ($this->getAttribute(($context["particle"] ?? null), "extra", [])) {
            echo ($context["attr_extra"] ?? null);
        }
        echo " >
                <div id=\"g-map-";
        // line 58
        echo twig_escape_filter($this->env, ($context["indentifier"] ?? null));
        echo "\" style=\"width: ";
        echo twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "width", []));
        echo "; height: ";
        echo twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "height", []));
        echo ";\">
                </div>
            </div>
        </div>
    </div>

";
    }

    // line 66
    public function block_javascript_footer($context, array $blocks = [])
    {
        // line 67
        echo "    ";
        $this->displayParentBlock("javascript_footer", $context, $blocks);
        echo "
    <script type=\"text/javascript\" src=\"https://maps.googleapis.com/maps/api/js";
        // line 68
        if ($this->getAttribute(($context["particle"] ?? null), "apikey", [])) {
            echo "?key=";
            echo twig_escape_filter($this->env, twig_trim_filter(twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "apikey", []))), "html", null, true);
        }
        echo "\"></script>
    <script type=\"text/javascript\">
        function initialize";
        // line 70
        echo twig_escape_filter($this->env, ($context["indentifier"] ?? null));
        echo "() {

            var latlng = new google.maps.LatLng(";
        // line 72
        echo twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "latitude", []));
        echo ",";
        echo twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "longitude", []));
        echo ");

            ";
        // line 74
        if (((($this->getAttribute(($context["particle"] ?? null), "dragging", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "dragging", []), "enabled")) : ("enabled")) == "enabled")) {
            // line 75
            echo "                var isDraggable = 1;
            ";
        } elseif (((($this->getAttribute(        // line 76
($context["particle"] ?? null), "dragging", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "dragging", []), "enabled")) : ("enabled")) == "disabledmobile")) {
            // line 77
            echo "                ";
            $this->getAttribute(($context["gantry"] ?? null), "load", [0 => "jquery"], "method");
            // line 78
            echo "                var isDraggable = jQuery(document).width() > 767 ? true : 0;
            ";
        } else {
            // line 80
            echo "                var isDraggable = 0;
            ";
        }
        // line 82
        echo "
            var myOptions =
            {
                zoom: ";
        // line 85
        echo twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "zoom", []));
        echo ",
                center: latlng,
                mapTypeId: google.maps.MapTypeId.";
        // line 87
        echo twig_escape_filter($this->env, (($this->getAttribute(($context["particle"] ?? null), "maptype", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "maptype", []), "ROADMAP")) : ("ROADMAP")));
        echo ",

                ";
        // line 89
        if ($this->getAttribute(($context["particle"] ?? null), "snazzymaps", [])) {
            // line 90
            echo "                    styles: ";
            echo $this->getAttribute(($context["particle"] ?? null), "snazzymaps", []);
            echo ",
                ";
        }
        // line 92
        echo "                    
                scrollwheel: ";
        // line 93
        echo twig_escape_filter($this->env, (($this->getAttribute(($context["particle"] ?? null), "scrollwheel", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "scrollwheel", []), 0)) : (0)));
        echo ",
                draggable: isDraggable
            };

            var map = new google.maps.Map(document.getElementById(\"g-map-";
        // line 97
        echo twig_escape_filter($this->env, ($context["indentifier"] ?? null));
        echo "\"), myOptions);

            ";
        // line 99
        if (((($this->getAttribute(($context["particle"] ?? null), "defaultmarker", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "defaultmarker", []), "show")) : ("show")) == "show")) {
            // line 100
            echo "                var myMarker = new google.maps.Marker(
                {
                    position: latlng,
                    map: map,
                });

                var contentString = '";
            // line 106
            echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "markertext", []), "js"), "html", null, true);
            echo "';

                var infowindow = new google.maps.InfoWindow({
                    content: contentString
                });

                ";
            // line 112
            if ($this->getAttribute(($context["particle"] ?? null), "markertext", [])) {
                // line 113
                echo "                    myMarker.addListener('click', function() {
                        infowindow.open(map, myMarker);
                    });

                    ";
                // line 117
                if ((($this->getAttribute(($context["particle"] ?? null), "markerstate", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "markerstate", []), 1)) : (1))) {
                    // line 118
                    echo "                        infowindow.open(map, myMarker);
                    ";
                }
                // line 120
                echo "                ";
            }
            // line 121
            echo "            ";
        }
        // line 122
        echo "
            ";
        // line 123
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["particle"] ?? null), "markers", []));
        foreach ($context['_seq'] as $context["_key"] => $context["marker"]) {
            // line 124
            echo "                ";
            $context["marker_id"] = twig_random($this->env);
            // line 125
            echo "
                var myMarker";
            // line 126
            echo twig_escape_filter($this->env, ($context["marker_id"] ?? null));
            echo " = new google.maps.Marker(
                {
                    position: {lat: ";
            // line 128
            echo twig_escape_filter($this->env, $this->getAttribute($context["marker"], "latitude", []));
            echo ", lng: ";
            echo twig_escape_filter($this->env, $this->getAttribute($context["marker"], "longitude", []));
            echo "},
                    map: map,
                });

                var contentString";
            // line 132
            echo twig_escape_filter($this->env, ($context["marker_id"] ?? null));
            echo " = '";
            echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($context["marker"], "markertext", []), "js"), "html", null, true);
            echo "';

                var infowindow";
            // line 134
            echo twig_escape_filter($this->env, ($context["marker_id"] ?? null));
            echo " = new google.maps.InfoWindow({
                    content: contentString";
            // line 135
            echo twig_escape_filter($this->env, ($context["marker_id"] ?? null));
            echo "
                });

                ";
            // line 138
            if ($this->getAttribute($context["marker"], "markertext", [])) {
                // line 139
                echo "                myMarker";
                echo twig_escape_filter($this->env, ($context["marker_id"] ?? null));
                echo ".addListener('click', function() {
                    infowindow";
                // line 140
                echo twig_escape_filter($this->env, ($context["marker_id"] ?? null));
                echo ".open(map, myMarker";
                echo twig_escape_filter($this->env, ($context["marker_id"] ?? null));
                echo ");
                });

                    ";
                // line 143
                if ((($this->getAttribute($context["marker"], "markerstate", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute($context["marker"], "markerstate", []), 1)) : (1))) {
                    // line 144
                    echo "                        infowindow";
                    echo twig_escape_filter($this->env, ($context["marker_id"] ?? null));
                    echo ".open(map, myMarker";
                    echo twig_escape_filter($this->env, ($context["marker_id"] ?? null));
                    echo ");
                    ";
                }
                // line 146
                echo "                ";
            }
            // line 147
            echo "
            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['marker'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 149
        echo "
            // Resize stuff...
            var currCenter = map.getCenter();

            // Fix for reloading the map in a modal
            jQuery('.uk-modal').on({
                'show.uk.modal': function(){
                    google.maps.event.trigger(map, \"resize\");
                    map.setCenter(currCenter);  
                }
            });

        }
        google.maps.event.addDomListener(window, 'load', initialize";
        // line 162
        echo twig_escape_filter($this->env, ($context["indentifier"] ?? null));
        echo ");

    </script>
";
    }

    public function getTemplateName()
    {
        return "@particles/get-in-touch.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  422 => 162,  407 => 149,  400 => 147,  397 => 146,  389 => 144,  387 => 143,  379 => 140,  374 => 139,  372 => 138,  366 => 135,  362 => 134,  355 => 132,  346 => 128,  341 => 126,  338 => 125,  335 => 124,  331 => 123,  328 => 122,  325 => 121,  322 => 120,  318 => 118,  316 => 117,  310 => 113,  308 => 112,  299 => 106,  291 => 100,  289 => 99,  284 => 97,  277 => 93,  274 => 92,  268 => 90,  266 => 89,  261 => 87,  256 => 85,  251 => 82,  247 => 80,  243 => 78,  240 => 77,  238 => 76,  235 => 75,  233 => 74,  226 => 72,  221 => 70,  213 => 68,  208 => 67,  205 => 66,  190 => 58,  179 => 57,  174 => 54,  166 => 51,  162 => 49,  159 => 48,  153 => 46,  150 => 45,  144 => 43,  141 => 42,  133 => 40,  131 => 39,  118 => 37,  112 => 36,  109 => 35,  104 => 34,  101 => 33,  97 => 32,  90 => 28,  84 => 24,  81 => 22,  79 => 21,  74 => 18,  72 => 17,  69 => 15,  66 => 14,  61 => 1,  59 => 12,  48 => 7,  44 => 6,  40 => 5,  38 => 4,  36 => 3,  30 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Source("", "@particles/get-in-touch.html.twig", "/home/webdevpb/public_html/iss/templates/it_insightfx/particles/get-in-touch.html.twig");
    }
}
