{%- set isIndex = 'index' == tmpl -%}
{%- set tmpl = 'list' -%}
{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}

{% block mauticContent 'report' %}

{% block headerTitle 'mautic.report.reports'|trans %}

{% block actions %}
  {{ include('@MauticCore/Helper/page_actions.html.twig', {
          'templateButtons': {
              'new': permissions['report:reports:create'],
          },
          'routeBase': 'report',
          'langVar': 'report.report',
      }
  ) }}
{% endblock %}

{% block content %}
  {% if isIndex %}
  <div class="panel panel-default bdr-t-wdh-0 mb-0">
      {{ include('@MauticCore/Helper/list_toolbar.html.twig', {
              'searchValue': searchValue,
              'searchHelp': 'mautic.report.report.help.searchcommands',
              'action': currentRoute,
      }) }}
      <div class="page-list">
        {{- include('@MauticReport/Report/_list.html.twig') -}}
      </div>
  </div>
  {% else %}
    {{- include('@MauticReport/Report/_list.html.twig') -}}
  {% endif %}
{% endblock %}
