<?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/_single */
class __TwigTemplate_2bae063567beb153fb4e1599198e64347c5ba72d5731a7797da649e6787344c0 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/_single");
        // line 1
        echo "<div class=\"property-item\">
  <a href=\"";
        // line 2
        echo twig_escape_filter($this->env, craft\helpers\UrlHelper::url(craft\helpers\Template::attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 2, $this->source); })()), "uri", [])), "html", null, true);
        echo "\" alt=\" item.title}}\" class=\"img\">

    ";
        // line 4
        if ((isset($context["transform"]) || array_key_exists("transform", $context) ? $context["transform"] : (function () { throw new RuntimeError('Variable "transform" does not exist.', 4, $this->source); })())) {
            // line 5
            echo "      ";
            $context["imgPath"] = craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 5, $this->source); })()), "pictures", []), "one", [], "method"), "getUrl", [0 => "resizeTo400Webp"], "method");
            // line 6
            echo "    ";
        } else {
            // line 7
            echo "      ";
            $context["imgPath"] = craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 7, $this->source); })()), "pictures", []), "one", [], "method"), "getUrl", [], "method");
            // line 8
            echo "    ";
        }
        // line 9
        echo "    
    <img src=\"";
        // line 10
        echo twig_escape_filter($this->env, (isset($context["imgPath"]) || array_key_exists("imgPath", $context) ? $context["imgPath"] : (function () { throw new RuntimeError('Variable "imgPath" does not exist.', 10, $this->source); })()), "html", null, true);
        echo "\" style='object-fit: fill;width:100%;height:350px' alt=\"Image\">
  </a>

  <div class=\"property-content\">
    <div class=\"price mb-2\"><span>\$";
        // line 14
        echo twig_escape_filter($this->env, twig_number_format_filter($this->env, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 14, $this->source); })()), "price", []), 0, ","), "html", null, true);
        echo ",000</span></div>
    <div>
      <span class=\"d-block mb-2 text-black-50\"
        >";
        // line 17
        echo twig_escape_filter($this->env, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 17, $this->source); })()), "title", []), "html", null, true);
        echo "</span
      >
     
      <span class=\"city d-block mb-3\">";
        // line 20
        echo twig_escape_filter($this->env, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 20, $this->source); })()), "suburb", []), "html", null, true);
        echo ", ";
        echo twig_escape_filter($this->env, craft\helpers\Template::attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 20, $this->source); })()), "state", []), "html", null, true);
        echo "</span>

      <div class=\"specs d-flex mb-4\">
        <span class=\"d-block d-flex align-items-center me-3\">
          <span class=\"icon-bed me-2\"></span>
          <span class=\"caption\">2 beds</span>
        </span>
        <span class=\"d-block d-flex align-items-center\">
          <span class=\"icon-bath me-2\"></span>
          <span class=\"caption\">2 baths</span>
        </span>
      </div>

      ";
        // line 33
        $context["categories"] = craft\helpers\Template::attribute($this->env, $this->source, 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.', 33, $this->source); })()), "categories", [], "method"), "relatedTo", [0 =>         // line 34
(isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 34, $this->source); })())], "method"), "all", [], "method");
        // line 36
        echo "
    
    ";
        // line 38
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 38, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
            // line 39
            echo "        <span class=\"badge bg-light text-dark\">
          ";
            // line 40
            echo twig_escape_filter($this->env, craft\helpers\Template::attribute($this->env, $this->source, $context["category"], "title", []), "html", null, true);
            echo "
        </span>
    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 43
        echo "      <div class=\"mt-4\">
        <a
        href=\"";
        // line 45
        echo twig_escape_filter($this->env, craft\helpers\UrlHelper::url(craft\helpers\Template::attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 45, $this->source); })()), "uri", [])), "html", null, true);
        echo "\"
        class=\"btn btn-primary py-2 px-3\"
        >See details</a>
      </div>
      
    </div>
  </div>
</div>";
        craft\helpers\Template::endProfile("template", "property/_single");
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  127 => 45,  123 => 43,  114 => 40,  111 => 39,  107 => 38,  103 => 36,  101 => 34,  100 => 33,  82 => 20,  76 => 17,  70 => 14,  63 => 10,  60 => 9,  57 => 8,  54 => 7,  51 => 6,  48 => 5,  46 => 4,  41 => 2,  38 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<div class=\"property-item\">
  <a href=\"{{ url(item.uri) }}\" alt=\" item.title}}\" class=\"img\">

    {% if transform %}
      {% set imgPath = item.pictures.one().getUrl('resizeTo400Webp') %}
    {% else %}
      {% set imgPath = item.pictures.one().getUrl() %}
    {% endif %}
    
    <img src=\"{{ imgPath }}\" style='object-fit: fill;width:100%;height:350px' alt=\"Image\">
  </a>

  <div class=\"property-content\">
    <div class=\"price mb-2\"><span>\${{ item.price | number_format(0,',')}},000</span></div>
    <div>
      <span class=\"d-block mb-2 text-black-50\"
        >{{item.title}}</span
      >
     
      <span class=\"city d-block mb-3\">{{item.suburb}}, {{item.state}}</span>

      <div class=\"specs d-flex mb-4\">
        <span class=\"d-block d-flex align-items-center me-3\">
          <span class=\"icon-bed me-2\"></span>
          <span class=\"caption\">2 beds</span>
        </span>
        <span class=\"d-block d-flex align-items-center\">
          <span class=\"icon-bath me-2\"></span>
          <span class=\"caption\">2 baths</span>
        </span>
      </div>

      {% set categories = craft.categories()
                         .relatedTo(item)
                        .all() %}

    
    {% for category in categories %}
        <span class=\"badge bg-light text-dark\">
          {{ category.title }}
        </span>
    {% endfor %}
      <div class=\"mt-4\">
        <a
        href=\"{{ url(item.uri) }}\"
        class=\"btn btn-primary py-2 px-3\"
        >See details</a>
      </div>
      
    </div>
  </div>
</div>", "property/_single", "/home/addons/atweb.space/sub/craft-demo/cms/templates/property/_single.twig");
    }
}
