<?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;

/* property/views/carousel-modal-gallery */
class __TwigTemplate_82362bd31bb74e3c3b62d86634ee08aaf8217e9be52183395102b8296bdc40ef 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;
        craft\helpers\Template::beginProfile("template", "property/views/carousel-modal-gallery");
        // line 1
        echo "<button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#imageModal\">
  Open Modal
</button>

<!-- The Modal -->
<div class=\"modal fade top\" id=\"imageModal\" tabindex=\"-1\" aria-labelledby=\"imageModalLabel\" aria-hidden=\"true\" data-bs-backdrop=\"true\" data-bs-keyboard=\"true\" style='height:100vh;background-color: grey;'>
  <div class=\"modal-dialog modal-fullscreen\">
    <div class=\"modal-content\">
      <!-- Carousel -->
      <div id=\"imageCarousel\" class=\"carousel slide\" data-bs-ride=\"carousel\">
        <div class=\"carousel-inner\">
        ";
        // line 13
        echo "        ";
        $context["isActive"] = 1;
        // line 14
        echo "        ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["imgA"]) || array_key_exists("imgA", $context) ? $context["imgA"] : (function () { throw new RuntimeError('Variable "imgA" does not exist.', 14, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["img"]) {
            // line 15
            echo "          <div class=\"carousel-item ";
            echo ((((isset($context["isActive"]) || array_key_exists("isActive", $context) ? $context["isActive"] : (function () { throw new RuntimeError('Variable "isActive" does not exist.', 15, $this->source); })()) == 1)) ? ("active") : (""));
            echo "\">
                  <img src=\"";
            // line 16
            echo twig_escape_filter($this->env, craft\helpers\Template::attribute($this->env, $this->source, $context["img"], "getUrl", [], "method"), "html", null, true);
            echo "\" alt=\"Image\" class=\"img-fluid\" class=\"d-block w-100\" style='height:90vh' alt=\"Image 1\"/>

          </div>
          ";
            // line 19
            $context["isActive"] = 0;
            // line 20
            echo "        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 21
        echo "        </div>
        <button class=\"carousel-control-prev\" type=\"button\" data-bs-target=\"#imageCarousel\" data-bs-slide=\"prev\">
          <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
          <span class=\"visually-hidden\">Previous</span>
        </button>
        <button class=\"carousel-control-next\" type=\"button\" data-bs-target=\"#imageCarousel\" data-bs-slide=\"next\">
          <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
          <span class=\"visually-hidden\">Next</span>
        </button>
      </div>


      <div class=\"footer p-2\">
      <div class=\"row\">
        <div class=\"col\">
        ";
        // line 36
        $context["i"] = 0;
        // line 37
        echo "        ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["imgA"]) || array_key_exists("imgA", $context) ? $context["imgA"] : (function () { throw new RuntimeError('Variable "imgA" does not exist.', 37, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["img"]) {
            // line 38
            echo "        
          <a data-bs-target=\"#imageCarousel\" data-bs-slide-to=\"";
            // line 39
            echo twig_escape_filter($this->env, (isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 39, $this->source); })()), "html", null, true);
            echo "\">
            <img src=\"";
            // line 40
            echo twig_escape_filter($this->env, craft\helpers\Template::attribute($this->env, $this->source, $context["img"], "getUrl", [], "method"), "html", null, true);
            echo "\" class='img-thumbnail' style='height:80px' alt=\"Thumbnail 1\">
          </a>
          ";
            // line 42
            $context["i"] = ((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 42, $this->source); })()) + 1);
            // line 43
            echo "        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 44
        echo "        </div>
        
        <div class=\"col-2\">
          <button type=\"button\" class=\"btn btn-secondary btn-sm mt-3\" data-bs-dismiss=\"modal\">Close</button>
        </div>
        
      </div>        
      </div>

    </div>
  </div>
</div>";
        craft\helpers\Template::endProfile("template", "property/views/carousel-modal-gallery");
    }

    public function getTemplateName()
    {
        return "property/views/carousel-modal-gallery";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  122 => 44,  116 => 43,  114 => 42,  109 => 40,  105 => 39,  102 => 38,  97 => 37,  95 => 36,  78 => 21,  72 => 20,  70 => 19,  64 => 16,  59 => 15,  54 => 14,  51 => 13,  38 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#imageModal\">
  Open Modal
</button>

<!-- The Modal -->
<div class=\"modal fade top\" id=\"imageModal\" tabindex=\"-1\" aria-labelledby=\"imageModalLabel\" aria-hidden=\"true\" data-bs-backdrop=\"true\" data-bs-keyboard=\"true\" style='height:100vh;background-color: grey;'>
  <div class=\"modal-dialog modal-fullscreen\">
    <div class=\"modal-content\">
      <!-- Carousel -->
      <div id=\"imageCarousel\" class=\"carousel slide\" data-bs-ride=\"carousel\">
        <div class=\"carousel-inner\">
        {# from parent #}
        {% set isActive = 1 %}
        {% for img in imgA %}
          <div class=\"carousel-item {{ (isActive==1) ?  'active' : '' }}\">
                  <img src=\"{{ img.getUrl() }}\" alt=\"Image\" class=\"img-fluid\" class=\"d-block w-100\" style='height:90vh' alt=\"Image 1\"/>

          </div>
          {% set isActive = 0 %}
        {% endfor %}
        </div>
        <button class=\"carousel-control-prev\" type=\"button\" data-bs-target=\"#imageCarousel\" data-bs-slide=\"prev\">
          <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
          <span class=\"visually-hidden\">Previous</span>
        </button>
        <button class=\"carousel-control-next\" type=\"button\" data-bs-target=\"#imageCarousel\" data-bs-slide=\"next\">
          <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
          <span class=\"visually-hidden\">Next</span>
        </button>
      </div>


      <div class=\"footer p-2\">
      <div class=\"row\">
        <div class=\"col\">
        {% set i = 0 %}
        {% for img in imgA %}
        
          <a data-bs-target=\"#imageCarousel\" data-bs-slide-to=\"{{i}}\">
            <img src=\"{{ img.getUrl() }}\" class='img-thumbnail' style='height:80px' alt=\"Thumbnail 1\">
          </a>
          {% set i = i + 1 %}
        {% endfor %}
        </div>
        
        <div class=\"col-2\">
          <button type=\"button\" class=\"btn btn-secondary btn-sm mt-3\" data-bs-dismiss=\"modal\">Close</button>
        </div>
        
      </div>        
      </div>

    </div>
  </div>
</div>", "property/views/carousel-modal-gallery", "/home/addons/atweb.space/sub/craft-demo/cms/templates/property/views/carousel-modal-gallery.twig");
    }
}
