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

/* _components/fieldtypes/Number/input.twig */
class __TwigTemplate_44973456bd96debdc0b3c3217c705fc8af6e825b3e28b4a6e1b4ee66cfa25f67 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", "_components/fieldtypes/Number/input.twig");
        // line 1
        $macros["__internal_parse_0"] = $this->macros["__internal_parse_0"] = $this->loadTemplate("_includes/forms", "_components/fieldtypes/Number/input.twig", 1)->unwrap();
        // line 3
        $context["id"] = (($context["id"]) ?? (craft\helpers\Template::attribute($this->env, $this->source, (isset($context["field"]) || array_key_exists("field", $context) ? $context["field"] : (function () { throw new RuntimeError('Variable "field" does not exist.', 3, $this->source); })()), "getInputId", [], "method")));
        // line 4
        $context["descriptionId"] = (($context["descriptionId"]) ?? (((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 4, $this->source); })()) . "-desc")));
        // line 5
        $context["prefix"] = (((craft\helpers\Template::attribute($this->env, $this->source, ($context["field"] ?? null), "prefix", [], "any", true, true) &&  !(null === craft\helpers\Template::attribute($this->env, $this->source, ($context["field"] ?? null), "prefix", [])))) ? (craft\helpers\Template::attribute($this->env, $this->source, ($context["field"] ?? null), "prefix", [])) : (false));
        // line 6
        $context["suffix"] = (((craft\helpers\Template::attribute($this->env, $this->source, ($context["field"] ?? null), "suffix", [], "any", true, true) &&  !(null === craft\helpers\Template::attribute($this->env, $this->source, ($context["field"] ?? null), "suffix", [])))) ? (craft\helpers\Template::attribute($this->env, $this->source, ($context["field"] ?? null), "suffix", [])) : (false));
        // line 7
        $context["hasPrefix"] =  !((isset($context["prefix"]) || array_key_exists("prefix", $context) ? $context["prefix"] : (function () { throw new RuntimeError('Variable "prefix" does not exist.', 7, $this->source); })()) === false);
        // line 8
        $context["hasSuffix"] =  !((isset($context["suffix"]) || array_key_exists("suffix", $context) ? $context["suffix"] : (function () { throw new RuntimeError('Variable "suffix" does not exist.', 8, $this->source); })()) === false);
        // line 9
        echo "
";
        // line 10
        if ((isset($context["formatNumber"]) || array_key_exists("formatNumber", $context) ? $context["formatNumber"] : (function () { throw new RuntimeError('Variable "formatNumber" does not exist.', 10, $this->source); })())) {
            // line 11
            echo "    ";
            echo craft\helpers\Html::hiddenInput((craft\helpers\Template::attribute($this->env, $this->source, (isset($context["field"]) || array_key_exists("field", $context) ? $context["field"] : (function () { throw new RuntimeError('Variable "field" does not exist.', 11, $this->source); })()), "handle", []) . "[locale]"), 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.', 11, $this->source); })()), "app", []), "formattingLocale", []), "id", []));
            echo "
";
        }
        // line 13
        echo "
";
        // line 14
        if (((isset($context["hasPrefix"]) || array_key_exists("hasPrefix", $context) ? $context["hasPrefix"] : (function () { throw new RuntimeError('Variable "hasPrefix" does not exist.', 14, $this->source); })()) || (isset($context["hasSuffix"]) || array_key_exists("hasSuffix", $context) ? $context["hasSuffix"] : (function () { throw new RuntimeError('Variable "hasSuffix" does not exist.', 14, $this->source); })()))) {
            // line 15
            echo "    ";
            echo $this->extensions['craft\web\twig\Extension']->tagFunction("span", ["id" =>             // line 16
(isset($context["descriptionId"]) || array_key_exists("descriptionId", $context) ? $context["descriptionId"] : (function () { throw new RuntimeError('Variable "descriptionId" does not exist.', 16, $this->source); })()), "class" => "visually-hidden", "text" => twig_join_filter($this->extensions['craft\web\twig\Extension']->filterFilter($this->env, [0 => ((            // line 19
(isset($context["hasPrefix"]) || array_key_exists("hasPrefix", $context) ? $context["hasPrefix"] : (function () { throw new RuntimeError('Variable "hasPrefix" does not exist.', 19, $this->source); })())) ? ($this->extensions['craft\web\twig\Extension']->translateFilter("Value prefixed by “{prefix}”.", "app", ["prefix" => (isset($context["prefix"]) || array_key_exists("prefix", $context) ? $context["prefix"] : (function () { throw new RuntimeError('Variable "prefix" does not exist.', 19, $this->source); })())])) : ("")), 1 => ((            // line 20
(isset($context["hasSuffix"]) || array_key_exists("hasSuffix", $context) ? $context["hasSuffix"] : (function () { throw new RuntimeError('Variable "hasSuffix" does not exist.', 20, $this->source); })())) ? ($this->extensions['craft\web\twig\Extension']->translateFilter("Value suffixed by “{suffix}”.", "app", ["suffix" => (isset($context["suffix"]) || array_key_exists("suffix", $context) ? $context["suffix"] : (function () { throw new RuntimeError('Variable "suffix" does not exist.', 20, $this->source); })())])) : (""))]), " ")]);
            // line 22
            echo "
";
        }
        // line 24
        echo "
<div class=\"flex\">
    ";
        // line 26
        if ((isset($context["hasPrefix"]) || array_key_exists("hasPrefix", $context) ? $context["hasPrefix"] : (function () { throw new RuntimeError('Variable "hasPrefix" does not exist.', 26, $this->source); })())) {
            // line 27
            echo "        <div aria-hidden=\"true\">
            ";
            // line 28
            echo $this->extensions['craft\web\twig\Extension']->markdownFilter((isset($context["prefix"]) || array_key_exists("prefix", $context) ? $context["prefix"] : (function () { throw new RuntimeError('Variable "prefix" does not exist.', 28, $this->source); })()), null, true);
            echo "
        </div>
    ";
        }
        // line 31
        echo "    <div>
        ";
        // line 32
        echo twig_call_macro($macros["__internal_parse_0"], "macro_text", [["id" =>         // line 33
(isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 33, $this->source); })()), "name" => ((        // line 34
(isset($context["formatNumber"]) || array_key_exists("formatNumber", $context) ? $context["formatNumber"] : (function () { throw new RuntimeError('Variable "formatNumber" does not exist.', 34, $this->source); })())) ? ((craft\helpers\Template::attribute($this->env, $this->source, (isset($context["field"]) || array_key_exists("field", $context) ? $context["field"] : (function () { throw new RuntimeError('Variable "field" does not exist.', 34, $this->source); })()), "handle", []) . "[value]")) : (craft\helpers\Template::attribute($this->env, $this->source, (isset($context["field"]) || array_key_exists("field", $context) ? $context["field"] : (function () { throw new RuntimeError('Variable "field" does not exist.', 34, $this->source); })()), "handle", []))), "value" =>         // line 35
(isset($context["value"]) || array_key_exists("value", $context) ? $context["value"] : (function () { throw new RuntimeError('Variable "value" does not exist.', 35, $this->source); })()), "inputmode" => ((craft\helpers\Template::attribute($this->env, $this->source,         // line 36
(isset($context["field"]) || array_key_exists("field", $context) ? $context["field"] : (function () { throw new RuntimeError('Variable "field" does not exist.', 36, $this->source); })()), "decimals", [])) ? ("decimal") : ("numeric")), "size" => craft\helpers\Template::attribute($this->env, $this->source,         // line 37
(isset($context["field"]) || array_key_exists("field", $context) ? $context["field"] : (function () { throw new RuntimeError('Variable "field" does not exist.', 37, $this->source); })()), "size", []), "describedBy" => ((twig_join_filter($this->extensions['craft\web\twig\Extension']->filterFilter($this->env, [0 => ((        // line 38
$context["describedBy"]) ?? (null)), 1 => ((((isset($context["hasPrefix"]) || array_key_exists("hasPrefix", $context) ? $context["hasPrefix"] : (function () { throw new RuntimeError('Variable "hasPrefix" does not exist.', 38, $this->source); })()) || (isset($context["hasSuffix"]) || array_key_exists("hasSuffix", $context) ? $context["hasSuffix"] : (function () { throw new RuntimeError('Variable "hasSuffix" does not exist.', 38, $this->source); })()))) ? ((isset($context["descriptionId"]) || array_key_exists("descriptionId", $context) ? $context["descriptionId"] : (function () { throw new RuntimeError('Variable "descriptionId" does not exist.', 38, $this->source); })())) : (null))]), " ")) ? (twig_join_filter($this->extensions['craft\web\twig\Extension']->filterFilter($this->env, [0 => (($context["describedBy"]) ?? (null)), 1 => ((((isset($context["hasPrefix"]) || array_key_exists("hasPrefix", $context) ? $context["hasPrefix"] : (function () { throw new RuntimeError('Variable "hasPrefix" does not exist.', 38, $this->source); })()) || (isset($context["hasSuffix"]) || array_key_exists("hasSuffix", $context) ? $context["hasSuffix"] : (function () { throw new RuntimeError('Variable "hasSuffix" does not exist.', 38, $this->source); })()))) ? ((isset($context["descriptionId"]) || array_key_exists("descriptionId", $context) ? $context["descriptionId"] : (function () { throw new RuntimeError('Variable "descriptionId" does not exist.', 38, $this->source); })())) : (null))]), " ")) : (false))]], 32, $context, $this->getSourceContext());
        // line 39
        echo "
    </div>
    ";
        // line 41
        if ((isset($context["hasSuffix"]) || array_key_exists("hasSuffix", $context) ? $context["hasSuffix"] : (function () { throw new RuntimeError('Variable "hasSuffix" does not exist.', 41, $this->source); })())) {
            // line 42
            echo "        <div aria-hidden=\"true\">
            ";
            // line 43
            echo $this->extensions['craft\web\twig\Extension']->markdownFilter((isset($context["suffix"]) || array_key_exists("suffix", $context) ? $context["suffix"] : (function () { throw new RuntimeError('Variable "suffix" does not exist.', 43, $this->source); })()), null, true);
            echo "
        </div>
    ";
        }
        // line 46
        echo "</div>
";
        craft\helpers\Template::endProfile("template", "_components/fieldtypes/Number/input.twig");
    }

    public function getTemplateName()
    {
        return "_components/fieldtypes/Number/input.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  119 => 46,  113 => 43,  110 => 42,  108 => 41,  104 => 39,  102 => 38,  101 => 37,  100 => 36,  99 => 35,  98 => 34,  97 => 33,  96 => 32,  93 => 31,  87 => 28,  84 => 27,  82 => 26,  78 => 24,  74 => 22,  72 => 20,  71 => 19,  70 => 16,  68 => 15,  66 => 14,  63 => 13,  57 => 11,  55 => 10,  52 => 9,  50 => 8,  48 => 7,  46 => 6,  44 => 5,  42 => 4,  40 => 3,  38 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% from '_includes/forms' import text %}

{%- set id = id ?? field.getInputId() %}
{%- set descriptionId = descriptionId ?? \"#{id}-desc\" %}
{%- set prefix = field.prefix ?? false %}
{%- set suffix = field.suffix ?? false %}
{%- set hasPrefix = prefix is not same as(false) %}
{%- set hasSuffix = suffix is not same as(false) %}

{% if formatNumber %}
    {{ hiddenInput(\"#{field.handle}[locale]\", craft.app.formattingLocale.id) }}
{% endif %}

{% if hasPrefix or hasSuffix %}
    {{ tag('span', {
        id: descriptionId,
        class: 'visually-hidden',
        text: [
            hasPrefix ? 'Value prefixed by “{prefix}”.'|t('app', {prefix: prefix}),
            hasSuffix ? 'Value suffixed by “{suffix}”.'|t('app', {suffix: suffix}),
        ]|filter|join(' '),
    }) }}
{% endif %}

<div class=\"flex\">
    {% if hasPrefix %}
        <div aria-hidden=\"true\">
            {{ prefix|md(inlineOnly=true)|raw }}
        </div>
    {% endif %}
    <div>
        {{ text({
            id: id,
            name: formatNumber ? \"#{field.handle}[value]\" : field.handle,
            value: value,
            inputmode: field.decimals ? 'decimal' : 'numeric',
            size: field.size,
            describedBy: [describedBy ?? null, hasPrefix or hasSuffix ? descriptionId : null]|filter|join(' ') ?: false,
        }) }}
    </div>
    {% if hasSuffix %}
        <div aria-hidden=\"true\">
            {{ suffix|md(inlineOnly=true)|raw }}
        </div>
    {% endif %}
</div>
", "_components/fieldtypes/Number/input.twig", "/home/addons/atweb.space/sub/craft-demo/cms/vendor/craftcms/cms/src/templates/_components/fieldtypes/Number/input.twig");
    }
}
