{#
/**
 * @file
 * Theme override for an 'input' #type form element.
 *
 * Available variables:
 * - attributes: A list of HTML attributes for the input element.
 * - children: Optional additional rendered elements.
 *
 * @see template_preprocess_input()
 */
#}

{% if attributes.hasClass('button') and not attributes.hasClass('btn') %}
  {%
    set classes = [
      'btn',
      attributes.hasClass('button--danger') ? 'btn-danger' : '',
      attributes.hasClass('button--primary') ? 'btn-primary' : '',
      (not attributes.hasClass('media-library-item__remove') and not attributes.hasClass('button--danger') and not attributes.hasClass('button--primary')) ? 'btn-secondary' : ''
    ]
  %}
  <input{{ attributes.addClass(classes) }} />
{% else %}
  <input{{ attributes }} />
{% endif %}
{{ children }}
