<input
    class="textinput"
    id="{{ route_name }}__textinput"
    name="search"
    class="form-control col-auto"
    onblur="phac_aspc_autocomplete_blur_handler('{{ route_name }}', {{ multiselect|yesno:'false,true' }})"
    {% if placeholder %}
    placeholder="{{ placeholder }}"
    {% endif %}
    type="search"
    {% if not multiselect and selected_items|length == 1 %}
    value="{{ selected_items.0.label }}"
    {% endif %}
    hx-get="{% url route_name method='items' %}"
    hx-trigger="keyup changed delay:250ms,click,focus,search"
    hx-include="#{{ route_name }} > input[name='{{ name }}']"
    hx-target="#{{ route_name }}__items"
    hx-swap="outerHTML"
    {% if swap_oob %}
    hx-swap-oob="outerHTML:#{{ route_name }}__textinput"
    {% endif %}
    hx-indicator="#{{ route_name }}__container .htmx-indicator"
>
