{% extends "@AutoAdminAdmin/entity_layout.html.twig" %}

{% block navbar_top_right %}
  <div class="col-4 d-flex flex-column align-items-end">
    <div class="d-flex flex-row topbar-actions">
      {% include '@AutoAdminAdmin/entity/_partials/next_prev.html.twig' %}
      {% include '@AutoAdminAdmin/entity/_partials/see_content.html.twig' %}
      {% include '@AutoAdminAdmin/entity/_partials/topbar_actions.html.twig' %}
    </div>
  </div>
{% endblock %}

{% block content_rows %}
  <!-- Content Row -->
  <div class="row">
    <div class="col-12 table-responsive">
      <table class="table table-bordered table-striped">
        {% if table.head is not empty %}
          <thead>
          <tr>
            {% for headLabel in table.head %}
              <th>{{ headLabel|trans({}, 'aa_admin') }}</th>
            {% endfor %}
          </tr>
          </thead>
        {% endif %}
        {% if table.body is not empty %}
          <tbody>
          {% for label, value in table.body %}
            <tr>
              <td>{{ label }}</td>
              <td>{{ value|raw }}</td>
            </tr>
          {% endfor %}
          </tbody>
        {% endif %}
        {% if table.foot is not empty %}
          <tbody>
          <tr>
            <td colspan="2">
              {% for action in table.foot %}
                {% include '@AutoAdminAdmin/_partials/components/buttons/btn-link-splitted.html.twig' with {
                  link: action.link,
                  level: action.buttonColor,
                  icon: action.icon,
                  name: action.name,
                  classes: action.classes|default(''),
                } %}
              {% endfor %}
            </td>
          </tr>
          </tbody>
        {% endif %}
      </table>
    </div>
  </div>
{% endblock %}