{% spaceless %}
{% if input.type == "submit" %}
  {% set tag = "button" %}
{% else %}
  {% set tag = "input" %}
{% endif %}

{% set classes = [] %}
{% if input.classes is not null %}
{% set classes = classes|merge(input.classes) %}
{% endif %}

{% if attributes.class is not null %}
{% set classes = classes|merge(attributes.class) %}
{% endif %}

<{{tag}} class="c-input {{ classes|join(' ') }}"
  type="{{ input.type | default("text") }}"
  id="{{ input.id | default("") }}"
  name="{{ input.name | default("Default Name Placeholder") }}"
  {% if input.placeholder is not null %}
       placeholder="{{ input.placeholder | default("Default Text Input Placeholder") }}"
  {% endif %}
  value="{{ input.value }}"

   {# Add Drupal attributes #}
   {{ attributes }}
/>
{% if input.type == "submit" %}
  {{ input.value }}
  </{{ tag }}>
{% endif %}

{% endspaceless %}
