{#
 # 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' %}

{% block stylesheets %}
  {{ parent() }}
  <link rel="stylesheet" href="{{ asset('themes/new-theme/public/theme' ~ rtl_suffix ~ '.css') }}"/>
{% endblock %}

{% block title %}
  {{ 'You do not have permission to do this'|trans({}, 'Admin.Notifications.Error') }}
{% endblock %}

{% block content %}
  <div class="container">
    <div class="mt-5">
      <div class="card">
        <div class="card-body text-center">
          <img class="img-responsive" src="{{ asset('themes/new-theme/img/error/error.svg') }}" width="320" height="auto" alt="{{ 'You do not have permission to do this'|trans({}, 'Admin.Notifications.Error') }}">

          <div class="mt-3">
            <p class="error-header">
              {{ 'You do not have permission to do this'|trans({}, 'Admin.Notifications.Error') }}
            </p>

            {% if exception is defined and exception %}
              <div class="mx-auto">
                <p class="mb-0">{{ exception.message }}</p>
              </div>
            {% endif %}

            {% if errorMessage is defined %}
              <div class="mx-auto">
                <p class="mb-0">{{ errorMessage }}</p>
              </div>
            {% endif %}

            <div class="mt-4">
              <form action="{{ path('admin_errors_enable_debug_mode') }}" method="post" class="d-inline">
                <input type="hidden" name="_redirect_url" value="{{ app.request.requestUri }}">

                <button class="btn btn-outline-secondary" type="submit">
                  {{ 'Enable debug mode'|trans({}, 'Admin.Actions') }}
                </button>
              </form>
              <button class="btn btn-primary js-go-back-btn ml-3" type="button">
                {{ 'Back to previous page'|trans({}, 'Admin.Actions') }}
              </button>
            </div>

            <p class="mt-3">
              <a href="{{ documentation_link('debug_mode') }}" target="_blank">
                {{ 'Learn more about debug mode'|trans({}, 'Admin.Actions') }}
                <i class="material-icons rtl-flip">arrow_right_alt</i>
              </a>
            </p>
          </div>
        </div>
      </div>
    </div>
  </div>
{% endblock %}

{% block javascripts %}
  <script src="{{ asset('themes/new-theme/public/error.bundle.js') }}"></script>
{% endblock %}
