{% set classes = ['aae-a-search-toggle-close', 'aae-a-search-toggle__close', 'e-atomic-element', base_styles.base|default('')] | merge(settings.classes | default([])) | join(' ') %}
{% set icon_url = settings.icon.url | default('') %}
<span class="{{ classes }} {{ editor_classes | default('') }}"
    data-id="{{ id }}"
    data-e-type="{{ type }}"
    data-interaction-id="{{ interaction_id }}"
    aria-hidden="true"
    {% if settings._cssid is defined and settings._cssid is not empty %}
        id="{{ settings._cssid | e('html_attr') }}"
    {% endif %}
    {% if settings.attributes is defined and settings.attributes is not empty %}
        {{ settings.attributes | raw }}
    {% endif %}
    {{ editor_attributes | default('') | raw }}>
    {% if icon_url is not empty %}
        <img src="{{ icon_url | e('html_attr') }}" alt="" aria-hidden="true" style="width:1em;height:1em;">
    {% else %}
        <svg viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
            <line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>
        </svg>
    {% endif %}
</span>
