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

/* extension/dashboard/stock_status_summary.twig */
class __TwigTemplate_fea1bf4a461b0b2ffc59e11074db6d36 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 "<div class=\"panel panel-default\">
  <div class=\"panel-heading\">
    <h3 class=\"panel-title\"><i class=\"fa fa-shopping-cart\"></i> ";
        // line 3
        echo ($context["heading_title"] ?? null);
        echo "</h3>
  </div>
  <div class=\"table-responsive\">
    <table class=\"table table-bordered\">
      <thead>
        <tr>
          <th>Stock Status</th>
          <th>Product Count</th>
        </tr>
      </thead>
      <tbody>
      ";
        // line 14
        $context["grand_total"] = 0;
        // line 15
        echo "      ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["stock_status_summary"] ?? null));
        $context['_iterated'] = false;
        foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
            // line 16
            echo "      ";
            $context["grand_total"] = (($context["grand_total"] ?? null) + twig_get_attribute($this->env, $this->source, $context["row"], "total", [], "any", false, false, false, 16));
            // line 17
            echo "      <tr>
        <td>";
            // line 18
            echo twig_get_attribute($this->env, $this->source, $context["row"], "stock_status", [], "any", false, false, false, 18);
            echo "</td>
        <td>";
            // line 19
            echo twig_get_attribute($this->env, $this->source, $context["row"], "total", [], "any", false, false, false, 19);
            echo "</td>
      </tr>
      ";
            $context['_iterated'] = true;
        }
        if (!$context['_iterated']) {
            // line 22
            echo "      <tr><td colspan=\"2\">No data available</td></tr>
      ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['row'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 24
        echo "      
      ";
        // line 25
        if (($context["stock_status_summary"] ?? null)) {
            // line 26
            echo "      <tr>
        <td><strong>Total</strong></td>
        <td><strong>";
            // line 28
            echo ($context["grand_total"] ?? null);
            echo "</strong></td>
      </tr>
      ";
        }
        // line 31
        echo "    </tbody>
    </table>
  </div>
</div>";
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "extension/dashboard/stock_status_summary.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable()
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  103 => 31,  97 => 28,  93 => 26,  91 => 25,  88 => 24,  81 => 22,  73 => 19,  69 => 18,  66 => 17,  63 => 16,  57 => 15,  55 => 14,  41 => 3,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "extension/dashboard/stock_status_summary.twig", "");
    }
}
