{% set name = input.fullName ?? input.name %}
<div class="input-wrapper input-text" 
    data-input-wrapper
    {{ input.autocomplete ? attr({
        'data-input-autocomplete': path(input.autocomplete) | raw
    }) }}
    {{ input.autocompleteJs ? attr({
        'data-input-autocomplete-js': input.autocompleteJs
    }) }}
>  
    {% set hasAutocomplete = input.autocomplete or input.autocompleteJs %}
    <label class="{{ input.labelClass }}" style="{{ not label ? 'display: none' }}" 
        for="input_{{ name }}"
    >
        {{ label }}{{ labelSuffixe(input.validator.mandatory) }}
        {% block label_inner %}{% endblock %}
    </label>
    <div class="bs-col relative">
        <input 
            {{ attr({
                type: input.password ? 'password' : 'text',
                name: input.fullName??input.name,
                value: value,

                autocomplete: 'off',

                id: 'input_' ~ input.name,
                class: 'form-control form-control-sm',
            } | merge(inputAttr ?? [])) }} 
            maxlength="{{ input.validator.max }}"
            data-main-input
            {% if hasAutocomplete %}
                data-onkeyup-echo="InputText.handleKeyup(event)"
                onfocus="InputText.autocompShowAndUpdate(this)"
                onblur="eventEcho(event, () => {
                    InputText.autocompDisplay(this, false)
                })"
            {% endif %}
            {{ input.disabled ? 'disabled' }}
        />
        {% if hasAutocomplete %}
            <div class="input-text-autocomplete" 
                data-autocomp-wrapper
                onclick="InputText.autocompInsert(event)"
                style="display: none"
            ></div>
        {% endif %}
        {% block input_after %}
        {% endblock %}
    </div>

    {% block post_input %}{% endblock %}
</div>
