{#
 # 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/layout.html.twig' %}
{% trans_default_domain 'Admin.Advparameters.Feature' %}
{% form_theme logsByEmailForm '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}

{% block content %}
  {% block logs_severity_level_meaning %}
    {{ include('@PrestaShop/Admin/Configure/AdvancedParameters/LogsPage/Blocks/severity_levels.html.twig') }}
  {% endblock %}

  {% block logs_main_panel %}
    {{ include('@PrestaShop/Admin/Common/Grid/grid_panel.html.twig', {grid: grid}) }}
  {% endblock %}

  {% block database_form %}
    {{ form_start(databaseForm, {action: path('admin_logs_save_database_settings')}) }}
    <div class="card">
      <h3 class="card-header">
        <i class="material-icons">settings</i>
        {{ 'Database'|trans }}
      </h3>
      <div class="card-body">
        <div class="form-wrapper">
          {{ form_widget(databaseForm) }}
        </div>
      </div>
      <div class="card-footer">
        <div class="d-flex justify-content-end">
          <button class="btn btn-primary save-database">{{ 'Save'|trans({}, 'Admin.Actions') }}</button>
        </div>
      </div>
    </div>
    {{ form_end(databaseForm) }}

  {% endblock %}

  {% block logs_by_mail %}
    {{ form_start(logsByEmailForm, {action: path('admin_logs_save_settings')}) }}
    <div class="card">
      <h3 class="card-header">
        <i class="material-icons">business_center</i>
        {{ 'Logs by email'|trans }}
      </h3>
      <div class="card-body">
        <div class="form-wrapper">
          {{ form_widget(logsByEmailForm) }}
        </div>
      </div>
      <div class="card-footer">
        <div class="d-flex justify-content-end">
          <button class="btn btn-primary">{{ 'Save'|trans({}, 'Admin.Actions') }}</button>
        </div>
      </div>
    </div>
    {{ form_end(logsByEmailForm) }}
  {% endblock %}
{% endblock %}
{% block javascripts %}
  {{ parent() }}
  <script src="{{ asset('themes/new-theme/public/logs.bundle.js') }}"></script>
  <script src="{{ asset('themes/default/js/bundle/pagination.js') }}"></script>
{% endblock %}
