{#
 # ---------------------------------------------------------------------
 #
 # GLPI - Gestionnaire Libre de Parc Informatique
 #
 # http://glpi-project.org
 #
 # @copyright 2015-2025 Teclib' and contributors.
 # @licence   https://www.gnu.org/licenses/gpl-3.0.html
 #
 # ---------------------------------------------------------------------
 #
 # LICENSE
 #
 # This file is part of GLPI.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 #
 # ---------------------------------------------------------------------
 #}

<div class="center mb-3">
   <a class="btn btn-primary me-2" href="{{ path('front/rule.backup.php?action=import') }}">
      <i class="fas fa-upload"></i>
      <span>{{ _x('button', 'Import') }}</span>
   </a>
   <a class="btn btn-primary me-2" href="{{ path('front/rule.backup.php?action=export') }}">
      <i class="fas fa-download"></i>
      <span>{{ _x('button', 'Export') }}</span>
   </a>
</div>

<div class="container px-4">
   <div class="row g-3 justify-content-evenly">
      {% for rules_block in rules_group %}
         <div class="col-12 {{ rules_group|length > 2 ? 'col-xxl-3' : 'col-xxl-5' }}">
            <div class="card">
               <div class="card-header">
                  <h3>{{ rules_block['type'] }}</h3>
               </div>
               <div class="list-group list-group-flush">
                  {% for rule in rules_block['entries'] %}
                     <a class="list-group-item list-group-item-action" href="{{ rule['link'] }}">
                        <i class="fa-fw {{ rule['icon'] }} me-1"></i>
                        <span>{{ rule['label'] }}</span>
                     </a>
                  {% endfor %}
               </div>
            </div>
         </div>
      {% endfor %}
   </div>
</div>
