{#
  AAE Form Previous — renders <button type="button" data-aae-form-step-nav="prev">
  directly. See aae-a-form-next.html.twig for the full rationale.

  Icon renders BEFORE the text (back-action convention): an uploaded SVG
  (Icon control) if set, else a built-in chevron glyph.
#}
{% set classes = ['aae-a-form-prev', 'e-atomic-element', base_styles.base | default('')] | merge(settings.classes | default([])) | join(' ') | trim %}
{% set allowed_tags = '<b><strong><sup><sub><s><em><i><u><del><span><br>' %}
{% set icon_url = settings.icon.url | default('') %}

<button
    class="{{ classes }} {{ editor_classes | default('') }}"
    type="button"
    data-id="{{ id }}"
    data-element_type="{{ type }}"
    data-e-type="{{ type }}"
    data-interaction-id="{{ interaction_id | default(id) }}"
    data-aae-form-step-nav="prev"
    {% 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 }}
><span class="aae-a-form-nav-icon" aria-hidden="true">{% if icon_url is not empty %}<img src="{{ icon_url | e('html_attr') }}" alt="" style="width:1em;height:1em;display:block;">{% else %}<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:block;"><path d="M19 12H5M11 18l-6-6 6-6"/></svg>{% endif %}</span><span class="aae-a-form-prev-text">{{ settings.text | striptags(allowed_tags) | raw }}</span></button>
