<div class="button is-light is-justify-content-space-between has-text-left my-1" style="width: 100%;" x-on:click="showParams = !showParams" x-bind:class="showParams ? 'is-active' : ''">
    <span class="has-text-weight-normal is-size-7" style="white-space: normal">{{ verbose_lookup }}</span>
    <input x-ref="filterLookup" type="hidden" name="filter_lookup" value="{{ lookup }}">
    <span class="icon is-small"><i class="fa fa-angle-down"></i> </span>
</div>
{% if input %}
    <div class="field has-addons" x-on:keyup.enter="addTag();">
        <p class="control is-expanded">
            {% if input.input_type == 'select' %}
                <span id="query-input-select-container" class="select is-fullwidth">
                    <select id="query-input-select" name="filter_input" x-ref="filterInput" data-type="{{ input.data_type }}" aria-label="query-input-select" style="border-bottom-left-radius: var(--bulma-radius-medium); border-top-left-radius: var(--bulma-radius-medium);" autofocus>
                        {% for choice in input.choices %}
                            <option value="{{ choice.0 }}" {% if forloop.first %}selected=""{% endif %}>{{ choice.1 }}</option>
                        {% endfor %}
                    </select>
                </span>
            {% else %}
                <input id="query-input" x-ref="filterInput" name="filter_input" type="{{ input.input_type }}"
                       {% if input.input_type == 'number' %}step="{{ input.step }}"{% endif %} aria-label="Query Input"
                       class="input is-fullwidth" placeholder="Enter a search term" autofocus autocomplete="off"
                       data-type="{{ input.data_type }}"
                >
            {% endif %}
        </p>
        <p class="control">
            <button class="button" x-on:click="addTag();">
                <span class="icon"><i class="fa fa-right-long"></i></span>
            </button>
        </p>
    </div>
{% endif %}
