{#
/**
 * @file
 * Default theme implementation for an individual form element.
 *
 * Available variables for all fields:
 * - multiple: Whether there are multiple instances of the field.
 *
 * Available variables for single cardinality fields:
 * - elements: Form elements to be rendered.
 *
 * Available variables when there are multiple fields.
 * - table: Table of field items.
 * - description: The description element containing the following properties:
 *   - content: The description content of the form element.
 *   - attributes: HTML attributes to apply to the description container.
 * - button: "Add another item" button.
 *
 * @see template_preprocess_field_multiple_value_form()
 *
 * @ingroup themeable
 */
#}
{% if multiple %}
  {%
    set classes = [
      'js-form-item',
      'form-item'
    ]
  %}
  <div{{ attributes.addClass(classes) }}>
    <div class="multivalue-container">
      {{ table }}
      {% if button %}
        <div class="add-new-wrapper">{{ button }}</div>
      {% endif %}
    </div>
    {% if description.content %}
      <canvas-description{{ description.attributes.addClass('description').addClass('description-unwrapped') }} description="{{ description.content|render|e('html_attr') }}" />
    {% endif %}
  </div>
{% else %}
  {% for element in elements %}
    {{ element }}
  {% endfor %}
{% endif %}
