{% load i18n %}
{% load icons %}

{% if simple %}
<span lang="{{ language.code }}" dir="{{ language.direction }}" {% if wrap %}class="wrap-text"{% endif %}>{{ items.0.content }}</span>
{% elif has_content %}
<div class="list-group">
  {% for item in items %}
  <div class="list-group-item sidebar-button">
    {% if item.title %}
    <h5 class="list-group-item-heading"><strong>{{ item.title }}</strong></h5>
    {% endif %}
    <div class="list-group-item-text" lang="{{ language.code }}" dir="{{ language.direction }}">
      {% if unit and item.copy %}
      <button type="button" class="btn btn-link btn-xs pull-right flip" data-clipboard-text="{{ item.copy }}" title="{% trans "Copy to clipboard" %}">{% icon "copy.svg" %}</button>
      <button type="button" class="btn btn-link btn-xs btn-sidebar pull-right flip" data-clone-text="{{ item.copy }}" title="{% trans "Clone to translation" %}">{% icon "clone.svg" %}</button>
      {% endif %}
      <span class="{% if wrap %}wrap-text{% endif %}">{{ item.content }}</span></div>
  </div>
  {% endfor %}
</div>
{% else %}
<div class="list-group">
  <div class="list-group-item" lang="{{ language.code }}">
    &nbsp;
  </div>
</div>
{% endif %}
