{% comment %} 
This template renders a selected item or chip.
{% endcomment %}

<li class="chip" aria-hidden="true">
    <span>{{ item.label }}</span>
    {% if not disabled %}
    <a
        hx-put="{% url route_name method='toggle' %}"
        hx-params="{{ name }},item,remove,component_id"
        hx-vals='{"component_id": "{{ component_id|escapejs }}", "remove": true, "item": "{{ item.value|escapejs }}"}'
        hx-include="#{{ component_id }}"
        hx-swap="delete"
        tabindex="-1"
        href="#"
    >
        <svg focusable="false" viewBox="0 0 24 24" width="0" height="0">
            <path
                d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z">
            </path>
        </svg>
    </a>
    {% endif %}
</li>
