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

/* /survey/questions/answer/multiplenumeric/answer.twig */
class __TwigTemplate_1c7e93191ed0d3678902275187b82498edd1482d05273b7e91417ab8353d9c1b extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->parent = false;

        $this->blocks = [
            'rows' => [$this, 'block_rows'],
            'dynamic' => [$this, 'block_dynamic'],
        ];
        $this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
        $this->checkSecurity();
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "
";
        // line 16
        echo "
<!-- Multiple Numerical with slider -->
<!-- answer -->
<ul class='";
        // line 19
        echo $this->sandbox->ensureToStringAllowed(($context["coreClass"] ?? null), 19, $this->source);
        echo " list-unstyled form-horizontal' role=\"group\" aria-labelledby=\"ls-question-text-";
        echo $this->sandbox->ensureToStringAllowed(($context["basename"] ?? null), 19, $this->source);
        echo "\">
    ";
        // line 20
        $this->displayBlock('rows', $context, $blocks);
        // line 29
        echo "    ";
        $this->displayBlock('dynamic', $context, $blocks);
        // line 44
        echo "</ul>
";
    }

    // line 20
    public function block_rows($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 21
        echo "        ";
        if (twig_test_empty(($context["aRows"] ?? null))) {
            // line 22
            echo "            ";
            $this->loadTemplate("/survey/questions/answer/multiplenumeric/empty.twig", "/survey/questions/answer/multiplenumeric/answer.twig", 22)->display($context);
            // line 23
            echo "        ";
        } else {
            // line 24
            echo "            ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["aRows"] ?? null));
            $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["aRow"]) {
                // line 25
                echo "                ";
                $this->loadTemplate(($context["rowTemplate"] ?? null), "/survey/questions/answer/multiplenumeric/answer.twig", 25)->display(twig_array_merge($context, $context["aRow"]));
                // line 26
                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['aRow'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 27
            echo "        ";
        }
        // line 28
        echo "    ";
    }

    // line 29
    public function block_dynamic($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 30
        echo "        ";
        echo twig_include($this->env, $context, ((        // line 31
array_key_exists("dynamicTemplate", $context)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(($context["dynamicTemplate"] ?? null), 31, $this->source), "/survey/questions/answer/multiplenumeric/rows/dynamic.twig")) : ("/survey/questions/answer/multiplenumeric/rows/dynamic.twig")), ["id" =>         // line 33
($context["id"] ?? null), "sumRemainingEqn" =>         // line 34
($context["sumRemainingEqn"] ?? null), "sumEqn" =>         // line 35
($context["sumEqn"] ?? null), "sLabelWidth" =>         // line 36
($context["sLabelWidth"] ?? null), "sInputContainerWidth" =>         // line 37
($context["sInputContainerWidth"] ?? null), "prefix" =>         // line 38
($context["prefix"] ?? null), "suffix" =>         // line 39
($context["suffix"] ?? null)]);
        // line 42
        echo "
    ";
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "/survey/questions/answer/multiplenumeric/answer.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  135 => 42,  133 => 39,  132 => 38,  131 => 37,  130 => 36,  129 => 35,  128 => 34,  127 => 33,  126 => 31,  124 => 30,  120 => 29,  116 => 28,  113 => 27,  99 => 26,  96 => 25,  78 => 24,  75 => 23,  72 => 22,  69 => 21,  65 => 20,  60 => 44,  57 => 29,  55 => 20,  49 => 19,  44 => 16,  41 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "/survey/questions/answer/multiplenumeric/answer.twig", "/home/mbsinsight/mbs-test.insightlink.com.au/application/views/survey/questions/answer/multiplenumeric/answer.twig");
    }
    
    public function checkSecurity()
    {
        static $tags = array("block" => 20, "if" => 21, "include" => 22, "for" => 24);
        static $filters = array("default" => 31);
        static $functions = array("include" => 31);

        try {
            $this->sandbox->checkSecurity(
                ['block', 'if', 'include', 'for'],
                ['default'],
                ['include']
            );
        } catch (SecurityError $e) {
            $e->setSourceContext($this->source);

            if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
                $e->setTemplateLine($tags[$e->getTagName()]);
            } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
                $e->setTemplateLine($filters[$e->getFilterName()]);
            } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
                $e->setTemplateLine($functions[$e->getFunctionName()]);
            }

            throw $e;
        }

    }
}
