{#
/**
 * @file
 * Theme implementation for an input form element.
 *
 * Available variables:
 * - attributes: A list of HTML attributes for the input element.
 * - children: Optional additional rendered elements.
 *
 * @see template_preprocess_input()
 */
#}
{% set modifier_classes = [
  dropbutton ? 'c-dropbutton__button',
  is_required ? 'is-required',
]|join(' ')|trim %}

{% set remove_classes = [
  'field-add-more-submit',
  'form-' ~ type|clean_class,
  'required',
] %}

{% include '@components/form-item/_input.twig' with {
  'attributes': attributes.removeClass(remove_classes),
  'modifier_classes': modifier_classes,
} %}
{{- children }}
