{% extends 'layout.twig' %}

{% set categoryTitle %}Tag Manager{% endset %}

{% set bodyClass = postEvent('Template.bodyClass', 'tagmanager') %}
{% set isAdminArea = true %}

{% block body %}
    {% set topMenuModule = 'TagManager' %}
    {% set topMenuAction = tagAction|default('') %}
    {{ postEvent("Template.header", "tagmanager") }}
    {{ parent() }}
    {{ postEvent("Template.footer", "tagmanager") }}
{% endblock %}

{% block root %}
    {% include "@CoreHome/_topScreen.twig" %}
    {% import '@TagManager/_menu.twig' as menu %}

    {% set hasSidebar = showMenu is not defined or showMenu %}

    <div class="layoutWithSidebar{% if hasSidebar %} layoutWithSidebar--hasSidebar{% endif %}">
        {% if hasSidebar %}
            {{ menu.menu(tagManagerMenu, mobileTagManagerMenu|default(tagManagerMenu), currentModule, currentAction, currentIdContainer, containerMenuItems) }}
        {% endif %}

        <div class="layoutWithSidebarContent">
            <div class="top_controls">
                {% block topcontrols %}

                    <div class="top_bar_sites_selector piwikTopControl">
                        <div
                            vue-entry="CoreHome.SiteSelector"
                            show-selected-site="true"
                            show-all-sites-item="false"
                            class="sites_autocomplete"
                        ></div>
                    </div>
                {% endblock %}
                {% include "@CoreHome/_headerMessage.twig" %}
            </div>

            <div class="page">
                <div class="pageWrap">
                    {% import 'ajaxMacros.twig' as ajax %}
                    {{ ajax.requestErrorDiv(emailSuperUser|default(''), areAdsForProfessionalServicesEnabled, currentModule) }}
                    {{ postEvent("Template.beforeContent", "admin", currentModule, currentAction) }}

                    <a name="main"></a>
                    {% block notification %}
                        {% include "@CoreHome/_notifications.twig" %}
                    {% endblock %}
                    {% include "@CoreHome/_warningInvalidHost.twig" %}

                    <div class="admin" id="content">

                        <div class="ui-confirm" id="alert">
                            <h2></h2>
                            <input role="no" type="button" value="{{ 'General_Ok'|translate }}"/>
                        </div>

                        {% block content %}
                        {% endblock %}

                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}
