{#
  AAE Form Label — renders <label for="…">text</label>.
  `input-id` (chosen from the form's field IDs) becomes the `for` attribute,
  associating this label with its input sibling. `text` is an Html_V3 prop
  the transformer resolves to a string; allow only inline formatting tags.
#}
{% set classes = ['aae-a-form-label', 'e-atomic-element', base_styles.base | default('')] | merge(settings.classes | default([])) | join(' ') | trim %}
{% set allowed_tags = '<b><strong><sup><sub><s><em><i><u><a><del><span><br>' %}

<label
    class="{{ classes }} {{ editor_classes | default('') }}"
    data-id="{{ id }}"
    data-element_type="{{ type }}"
    data-e-type="{{ type }}"
    data-interaction-id="{{ interaction_id | default(id) }}"
    {% if settings._cssid is defined and settings._cssid is not empty %}id="{{ settings._cssid | e('html_attr') }}"{% endif %}
    {% if settings['input-id'] is defined and settings['input-id'] is not empty %}for="{{ settings['input-id'] | e('html_attr') }}"{% endif %}
    {% if settings.attributes is defined and settings.attributes is not empty %}{{ settings.attributes | raw }}{% endif %}
    {{ editor_attributes | default('') | raw }}
>{{ settings.text | striptags(allowed_tags) | raw }}</label>
