{#
 # For the full copyright and license information, please view the
 # docs/licenses/LICENSE.txt file that was distributed with this source code.
 #}
{% extends '@PrestaShop/Admin/Module/common.html.twig' %}

{% block content %}
  <div class="row justify-content-center">
    <div class="col-xl-10">
      {# Bulk Action confirm modal #}
      {{ include('@PrestaShop/Admin/Module/Includes/modal_confirm_bulk_action.html.twig') }}
      {# Contains toolbar-nav for module page with level authorization #}
      {{ include('@PrestaShop/Admin/Module/Includes/modal_import.html.twig', {level: level, errorMessage: errorMessage}) }}
      {# Contains menu with Selection/Categories/Popular and Tag Search #}
      {{ include('@PrestaShop/Admin/Module/Includes/menu_top.html.twig', {topMenuData: topMenuData, bulkActions: bulkActions}) }}

      {{ include('@PrestaShop/Admin/Module/Includes/grid_manage_recently_used.html.twig', {display_type: 'list', origin: 'manage'}) }}

      {% block catalog_categories_listing %}
        {% for category in categories.subMenu %}
          {% if category.modules is empty %}
            {{ include('@PrestaShop/Admin/Module/Includes/grid_manage_empty.html.twig', {category: category, display_type: 'list', origin: 'manage'}) }}
          {% else %}
            <div class="module-short-list">
              <span id="{{ category.refMenu }}_modules" class="module-search-result-title">{{ category.name|trans({}, 'Admin.Modules.Feature') }}</span>
              {{ include('@PrestaShop/Admin/Module/Includes/grid_manage_installed.html.twig', {modules: category.modules, display_type: 'list', origin: 'manage', id: category.refMenu}) }}
            </div>
          {% endif %}
        {% endfor %}
      {% endblock %}
    </div>
  </div>
{% endblock %}
