<?php

/* @websiteWidgets/form_elements/templates/input.twig.html */
class __TwigTemplate_11f4d262df05de16421c229c371a1c1e03c26c4e2fa72867354dd1860c25835a extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        echo "<div data-widget-id=\"";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getWidgetId", [], "method"), "html", null, true);
        echo "\" class=\"moto-widget moto-widget-form_elements-input moto-preset-";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getCurrentPreset", [], "method"), "html", null, true);
        echo " ";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getSpacing", [0 => "classes"], "method"), "html", null, true);
        echo "\" data-widget=\"form_elements.input\">
    ";
        // line 2
        if ((isset($context["isPreview"]) ? $context["isPreview"] : null)) {
            // line 3
            echo "        <div class=\"moto-widget-cover\"></div>
    ";
        }
        // line 5
        echo "    <div class=\"moto-form__element moto-form__element_input\" ng-class=\"{'moto-form__element_invalid' : (\$FORM.\$submitted || \$FORM['";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "'].\$touched) && \$FORM['";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "'].\$invalid}\">
        <div class=\"moto-form__field";
        // line 6
        if ($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "icon", []), "id", [])) {
            echo " moto-form__field_with-icon";
        }
        echo "\">
            <input class=\"moto-form__field-control moto-form__field-control_input\"
                   type=\"";
        // line 8
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldType", [], "method"), "html", null, true);
        echo "\"
                   name=\"";
        // line 9
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "\"
                   ng-model=\"message['";
        // line 10
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "']\"
                   ";
        // line 11
        if (($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldType", [], "method") == "date")) {
            echo "ng-model-options=\"{timezone: 'UTC'}\"";
        }
        // line 12
        echo "                   ng-change=\"onFieldChanged('";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
        echo "')\"
                    ";
        // line 13
        if (($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "type", []) == "number")) {
            // line 14
            echo "                        ";
            if (($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "numberValue", []), "allowMin", []) && ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "numberValue", []), "minValue", []) != null))) {
                // line 15
                echo "                            ng-min=\"";
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "numberValue", []), "minValue", []), "html", null, true);
                echo "\"
                        ";
            }
            // line 17
            echo "                        ";
            if (($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "numberValue", []), "allowMax", []) && ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "numberValue", []), "maxValue", []) != null))) {
                // line 18
                echo "                            ng-max=\"";
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "numberValue", []), "maxValue", []), "html", null, true);
                echo "\"
                        ";
            }
            // line 20
            echo "                    ";
        } else {
            // line 21
            echo "                        ";
            if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "stringLength", []), "allowMin", [])) {
                // line 22
                echo "                            ng-minlength=\"";
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "stringLength", []), "minValue", []), "html", null, true);
                echo "\"
                        ";
            }
            // line 24
            echo "                        ";
            if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "stringLength", []), "allowMax", [])) {
                // line 25
                echo "                            ng-maxlength=\"";
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "stringLength", []), "maxValue", []), "html", null, true);
                echo "\"
                        ";
            }
            // line 27
            echo "                    ";
        }
        // line 28
        echo "                    ";
        if ($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "placeholder", [])) {
            echo "placeholder=\"";
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "placeholder", []), "html", null, true);
            echo "\"";
        }
        // line 29
        echo "                    ";
        if ($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "validation", []), "required", [])) {
            echo " required";
        }
        echo ">
            ";
        // line 30
        if ($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "icon", []), "id", [])) {
            echo "<span class=\"moto-form__field-icon\"><span class=\"fa fa-fw fa-";
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "icon", []), "id", []), "html", null, true);
            echo "\" aria-hidden=\"true\"></span></span>";
        }
        // line 31
        echo "        </div>
        ";
        // line 32
        if ($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "description", []), "text", [])) {
            echo "<div class=\"moto-form__field-description ";
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "description", []), "style", []), "html", null, true);
            echo " ";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getAlignClass", [0 => "moto-align-", 1 => "description.align"], "method"), "html", null, true);
            echo "\">";
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "description", []), "text", []), "html", null, true);
            echo "</div>";
        }
        // line 33
        echo "        ";
        if ((isset($context["isPreview"]) ? $context["isPreview"] : null)) {
            // line 34
            echo "            <div class=\"moto-form__errors moto-form__errors_only-first\"></div>
        ";
        } else {
            // line 36
            echo "            <div data-moto-form-errors class=\"moto-form__errors moto-form__errors_only-first\"
                 data-field-name=\"";
            // line 37
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldName", [], "method"), "html", null, true);
            echo "\"
                 data-field-type=\"";
            // line 38
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getFieldType", [], "method"), "html", null, true);
            echo "\"
                 data-rules=\"";
            // line 39
            echo twig_escape_filter($this->env, twig_jsonencode_filter($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getValidationRules", [], "method")), "html", null, true);
            echo "\"
                 data-form=\"\$FORM\"></div>
        ";
        }
        // line 42
        echo "    </div>
</div>";
    }

    public function getTemplateName()
    {
        return "@websiteWidgets/form_elements/templates/input.twig.html";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  170 => 42,  164 => 39,  160 => 38,  156 => 37,  153 => 36,  149 => 34,  146 => 33,  136 => 32,  133 => 31,  127 => 30,  120 => 29,  113 => 28,  110 => 27,  104 => 25,  101 => 24,  95 => 22,  92 => 21,  89 => 20,  83 => 18,  80 => 17,  74 => 15,  71 => 14,  69 => 13,  64 => 12,  60 => 11,  56 => 10,  52 => 9,  48 => 8,  41 => 6,  34 => 5,  30 => 3,  28 => 2,  19 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Twig_Source("", "@websiteWidgets/form_elements/templates/input.twig.html", "/data05/c3111787/public_html/brcc.me.uk/mt-includes/widgets/form_elements/templates/input.twig.html");
    }
}
