<?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/index */
class __TwigTemplate_97eb21054e10f3ddcfa997401a9d858b extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "layouts/_main";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        craft\helpers\Template::beginProfile("template", "property/index");
        $this->parent = $this->loadTemplate("layouts/_main", "property/index", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
        craft\helpers\Template::endProfile("template", "property/index");
    }

    // line 5
    public function block_content($context, array $blocks = [])
    {
        $macros = $this->macros;
        craft\helpers\Template::beginProfile("block", "content");
        // line 6
        echo "
  <div class=\"section mt-5\">
    <div class=\"container mt-4\">
      <div class=\"row mb-5 align-items-center\">
        <div class=\"col-lg-6 text-center mx-auto\">
          <h2 class=\"font-weight-bold text-primary heading\">
            Featured Properties
          </h2>
          <h5>Non Next Gen Webp Optimized</h5>



        </div>
      </div>
      <form>
      <div class=\"row my-4\">
        <div class=\"col\">
          ";
        // line 23
        $context["req"] = craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["craft"]) || array_key_exists("craft", $context) ? $context["craft"] : (function () { throw new RuntimeError('Variable "craft" does not exist.', 23, $this->source); })()), "app", []), "request", []);
        // line 24
        echo "          ";
        $context["suburb"] = craft\helpers\Template::attribute($this->env, $this->source, (isset($context["req"]) || array_key_exists("req", $context) ? $context["req"] : (function () { throw new RuntimeError('Variable "req" does not exist.', 24, $this->source); })()), "getQueryParam", [0 => "suburb"], "method");
        // line 25
        echo "            Suburb (2 Field Basic Search)
            <input type=\"text\" class=\"form-control form-control-sm\" placeholder=\"Search\" name='suburb' aria-label=\"Text Search\" value=\"";
        // line 26
        echo twig_escape_filter($this->env, (isset($context["suburb"]) || array_key_exists("suburb", $context) ? $context["suburb"] : (function () { throw new RuntimeError('Variable "suburb" does not exist.', 26, $this->source); })()), "html", null, true);
        echo "\">
          
        </div>
        ";
        // line 29
        $context["price_low"] = craft\helpers\Template::attribute($this->env, $this->source, (isset($context["req"]) || array_key_exists("req", $context) ? $context["req"] : (function () { throw new RuntimeError('Variable "req" does not exist.', 29, $this->source); })()), "getQueryParam", [0 => "price_low"], "method");
        // line 30
        echo "

        <div class=\"col-2\">
          Price From ('000)
          ";
        // line 34
        $context["price_low"] = craft\helpers\Template::attribute($this->env, $this->source, (isset($context["req"]) || array_key_exists("req", $context) ? $context["req"] : (function () { throw new RuntimeError('Variable "req" does not exist.', 34, $this->source); })()), "getQueryParam", [0 => "price_low"], "method");
        // line 35
        echo "          <input type=\"text\" class=\"form-control form-control-sm\" name=\"price_low\" value='";
        echo twig_escape_filter($this->env, (isset($context["price_low"]) || array_key_exists("price_low", $context) ? $context["price_low"] : (function () { throw new RuntimeError('Variable "price_low" does not exist.', 35, $this->source); })()), "html", null, true);
        echo "'>
        </div>
        <div class='col-2'>  
          Price To
          ";
        // line 39
        $context["price_high"] = craft\helpers\Template::attribute($this->env, $this->source, (isset($context["req"]) || array_key_exists("req", $context) ? $context["req"] : (function () { throw new RuntimeError('Variable "req" does not exist.', 39, $this->source); })()), "getQueryParam", [0 => "price_high"], "method");
        // line 40
        echo "          <input type=\"type\" class=\"form-control form-control-sm\" name=\"price_high\" value='";
        echo twig_escape_filter($this->env, (isset($context["price_high"]) || array_key_exists("price_high", $context) ? $context["price_high"] : (function () { throw new RuntimeError('Variable "price_high" does not exist.', 40, $this->source); })()), "html", null, true);
        echo "'>
        </div>
        <div class=\"col\"><br>
            <button class='btn btn-primary'>Search</button>    
        </div>
        
      </div>
      </form>

        <div class=\"row\">
          <div class=\"col-12\" >
            <div class=\"property-slider-wrap\">
              <div class=\"property-slider\">
                
                <!-- .item -->
                ";
        // line 55
        $context["query"] = craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["craft"]) || array_key_exists("craft", $context) ? $context["craft"] : (function () { throw new RuntimeError('Variable "craft" does not exist.', 55, $this->source); })()), "entries", []), "section", [0 => "property"], "method");
        // line 56
        echo "
                ";
        // line 57
        if ((isset($context["suburb"]) || array_key_exists("suburb", $context) ? $context["suburb"] : (function () { throw new RuntimeError('Variable "suburb" does not exist.', 57, $this->source); })())) {
            // line 58
            echo "                  ";
            $context["query"] = craft\helpers\Template::attribute($this->env, $this->source, (isset($context["query"]) || array_key_exists("query", $context) ? $context["query"] : (function () { throw new RuntimeError('Variable "query" does not exist.', 58, $this->source); })()), "suburb", [0 => (("*" . (isset($context["suburb"]) || array_key_exists("suburb", $context) ? $context["suburb"] : (function () { throw new RuntimeError('Variable "suburb" does not exist.', 58, $this->source); })())) . "*")], "method");
            // line 59
            echo "                ";
        }
        // line 60
        echo "

                ";
        // line 62
        if ((isset($context["price_low"]) || array_key_exists("price_low", $context) ? $context["price_low"] : (function () { throw new RuntimeError('Variable "price_low" does not exist.', 62, $this->source); })())) {
            // line 63
            echo "                  ";
            $context["query"] = craft\helpers\Template::attribute($this->env, $this->source, (isset($context["query"]) || array_key_exists("query", $context) ? $context["query"] : (function () { throw new RuntimeError('Variable "query" does not exist.', 63, $this->source); })()), "price", [0 => (">= " . (isset($context["price_low"]) || array_key_exists("price_low", $context) ? $context["price_low"] : (function () { throw new RuntimeError('Variable "price_low" does not exist.', 63, $this->source); })()))], "method");
            // line 64
            echo "                ";
        }
        // line 65
        echo "
                ";
        // line 66
        if ((isset($context["price_high"]) || array_key_exists("price_high", $context) ? $context["price_high"] : (function () { throw new RuntimeError('Variable "price_high" does not exist.', 66, $this->source); })())) {
            // line 67
            echo "                  ";
            $context["query"] = craft\helpers\Template::attribute($this->env, $this->source, (isset($context["query"]) || array_key_exists("query", $context) ? $context["query"] : (function () { throw new RuntimeError('Variable "query" does not exist.', 67, $this->source); })()), "price", [0 => ("<= " . (isset($context["price_high"]) || array_key_exists("price_high", $context) ? $context["price_high"] : (function () { throw new RuntimeError('Variable "price_high" does not exist.', 67, $this->source); })()))], "method");
            // line 68
            echo "                ";
        }
        // line 69
        echo "
                ";
        // line 70
        if (((isset($context["price_low"]) || array_key_exists("price_low", $context) ? $context["price_low"] : (function () { throw new RuntimeError('Variable "price_low" does not exist.', 70, $this->source); })()) && (isset($context["price_high"]) || array_key_exists("price_high", $context) ? $context["price_high"] : (function () { throw new RuntimeError('Variable "price_high" does not exist.', 70, $this->source); })()))) {
            echo " 
                  ";
            // line 71
            $context["query"] = craft\helpers\Template::attribute($this->env, $this->source, (isset($context["query"]) || array_key_exists("query", $context) ? $context["query"] : (function () { throw new RuntimeError('Variable "query" does not exist.', 71, $this->source); })()), "price", [0 => [0 => "and", 1 => (">=" . (isset($context["price_low"]) || array_key_exists("price_low", $context) ? $context["price_low"] : (function () { throw new RuntimeError('Variable "price_low" does not exist.', 71, $this->source); })())), 2 => ("<=" . (isset($context["price_high"]) || array_key_exists("price_high", $context) ? $context["price_high"] : (function () { throw new RuntimeError('Variable "price_high" does not exist.', 71, $this->source); })()))]], "method");
            // line 72
            echo "                ";
        }
        // line 73
        echo "

                ";
        // line 75
        $context["array"] = craft\helpers\Template::attribute($this->env, $this->source, (isset($context["query"]) || array_key_exists("query", $context) ? $context["query"] : (function () { throw new RuntimeError('Variable "query" does not exist.', 75, $this->source); })()), "all", [], "method");
        // line 76
        echo "                
                ";
        // line 77
        $context["transform"] = false;
        // line 78
        echo "                
                ";
        // line 79
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["array"]) || array_key_exists("array", $context) ? $context["array"] : (function () { throw new RuntimeError('Variable "array" does not exist.', 79, $this->source); })()));
        $context['loop'] = [
          'parent' => $context['_parent'],
          'index0' => 0,
          'index'  => 1,
          'first'  => true,
        ];
        if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
            $length = count($context['_seq']);
            $context['loop']['revindex0'] = $length - 1;
            $context['loop']['revindex'] = $length;
            $context['loop']['length'] = $length;
            $context['loop']['last'] = 1 === $length;
        }
        foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
            // line 80
            echo "                  ";
            $this->loadTemplate("property/_single", "property/index", 80)->display(twig_array_merge($context, ["item" =>             // line 81
$context["item"], "transform" =>             // line 82
(isset($context["transform"]) || array_key_exists("transform", $context) ? $context["transform"] : (function () { throw new RuntimeError('Variable "transform" does not exist.', 82, $this->source); })())]));
            // line 84
            echo "                ";
            ++$context['loop']['index0'];
            ++$context['loop']['index'];
            $context['loop']['first'] = false;
            if (isset($context['loop']['length'])) {
                --$context['loop']['revindex0'];
                --$context['loop']['revindex'];
                $context['loop']['last'] = 0 === $context['loop']['revindex0'];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 85
        echo "                <!-- .item -->
              </div>

              <div
                id=\"property-nav\"
                class=\"controls\"
                tabindex=\"0\"
                aria-label=\"Carousel Navigation\"
              >
                <span
                  class=\"prev\"
                  data-controls=\"prev\"
                  aria-controls=\"property\"
                  tabindex=\"-1\"
                  >Prev</span
                >
                <span
                  class=\"next\"
                  data-controls=\"next\"
                  aria-controls=\"property\"
                  tabindex=\"-1\"
                  >Next</span
                >
              </div>
            </div>
          </div>
        </div>


    </div>
  </div>

";
        craft\helpers\Template::endProfile("block", "content");
    }

    public function getTemplateName()
    {
        return "property/index";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  223 => 85,  209 => 84,  207 => 82,  206 => 81,  204 => 80,  187 => 79,  184 => 78,  182 => 77,  179 => 76,  177 => 75,  173 => 73,  170 => 72,  168 => 71,  164 => 70,  161 => 69,  158 => 68,  155 => 67,  153 => 66,  150 => 65,  147 => 64,  144 => 63,  142 => 62,  138 => 60,  135 => 59,  132 => 58,  130 => 57,  127 => 56,  125 => 55,  106 => 40,  104 => 39,  96 => 35,  94 => 34,  88 => 30,  86 => 29,  80 => 26,  77 => 25,  74 => 24,  72 => 23,  53 => 6,  48 => 5,  35 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% extends 'layouts/_main' %}



{% block content %}

  <div class=\"section mt-5\">
    <div class=\"container mt-4\">
      <div class=\"row mb-5 align-items-center\">
        <div class=\"col-lg-6 text-center mx-auto\">
          <h2 class=\"font-weight-bold text-primary heading\">
            Featured Properties
          </h2>
          <h5>Non Next Gen Webp Optimized</h5>



        </div>
      </div>
      <form>
      <div class=\"row my-4\">
        <div class=\"col\">
          {% set req = craft.app.request %}
          {% set suburb = req.getQueryParam(\"suburb\") %}
            Suburb (2 Field Basic Search)
            <input type=\"text\" class=\"form-control form-control-sm\" placeholder=\"Search\" name='suburb' aria-label=\"Text Search\" value=\"{{ suburb }}\">
          
        </div>
        {% set price_low = req.getQueryParam('price_low') %}


        <div class=\"col-2\">
          Price From ('000)
          {% set price_low = req.getQueryParam('price_low') %}
          <input type=\"text\" class=\"form-control form-control-sm\" name=\"price_low\" value='{{price_low}}'>
        </div>
        <div class='col-2'>  
          Price To
          {% set price_high = req.getQueryParam('price_high') %}
          <input type=\"type\" class=\"form-control form-control-sm\" name=\"price_high\" value='{{price_high}}'>
        </div>
        <div class=\"col\"><br>
            <button class='btn btn-primary'>Search</button>    
        </div>
        
      </div>
      </form>

        <div class=\"row\">
          <div class=\"col-12\" >
            <div class=\"property-slider-wrap\">
              <div class=\"property-slider\">
                
                <!-- .item -->
                {% set query = craft.entries.section('property') %}

                {% if suburb %}
                  {% set query = query.suburb('*'~ suburb ~'*') %}
                {% endif %}


                {% if price_low %}
                  {% set query = query.price('>= '~ price_low) %}
                {% endif %}

                {% if price_high %}
                  {% set query = query.price('<= '~ price_high) %}
                {% endif %}

                {% if price_low and price_high %} 
                  {% set query = query.price(['and','>='~ price_low, '<='~ price_high]) %}
                {% endif %}


                {% set array = query.all() %}
                
                {% set transform = false %}
                
                {% for item in array  %}
                  {% include 'property/_single' with {
                    item: item,
                    transform: transform
                  } %}
                {% endfor %}
                <!-- .item -->
              </div>

              <div
                id=\"property-nav\"
                class=\"controls\"
                tabindex=\"0\"
                aria-label=\"Carousel Navigation\"
              >
                <span
                  class=\"prev\"
                  data-controls=\"prev\"
                  aria-controls=\"property\"
                  tabindex=\"-1\"
                  >Prev</span
                >
                <span
                  class=\"next\"
                  data-controls=\"next\"
                  aria-controls=\"property\"
                  tabindex=\"-1\"
                  >Next</span
                >
              </div>
            </div>
          </div>
        </div>


    </div>
  </div>

{% endblock %}", "property/index", "/home/addons/atweb.space/sub/craft-demo/cms/templates/property/index.twig");
    }
}
