<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_page %}
<div
    class="sw-page"
    :class="pageClasses"
>
    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_page_head_area %}
    <div
        v-if="showHeadArea"
        class="sw-page__head-area"
        :style="headerStyles"
    >
        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_page_search_bar %}
        <div
            v-if="showSearchBar"
            class="sw-page__search-bar"
        >
            <slot name="search-bar">
                <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                {% block sw_page_slot_search_bar %}
                <sw-search-bar />
                {% endblock %}
            </slot>
        </div>

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_page_top_bar_actions %}
        <div
            class="sw-page__top-bar-actions"
            :style="topBarActionStyles"
        >
            <sw-app-topbar-button />
            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_page_notification_center %}
            <sw-notification-center />
            {% endblock %}

            <sw-help-center-v2 />
        </div>
        {% endblock %}
        {% endblock %}

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_page_smart_bar %}
        <template v-if="showSmartBar">
            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_page_smart_bar_divider %}
            <div
                v-if="showSmartBar && showSearchBar"
                class="sw-page__smart-bar-divider"
            ></div>
            {% endblock %}

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_page_smart_bar_back_btn %}
            <div
                class="sw-page__back-btn-container"
                :style="smartBarContentStyle"
            >
                <slot name="smart-bar-back">
                    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                    {% block sw_page_slot_smart_bar_back %}
                    <router-link
                        v-if="parentRoute"
                        class="smart-bar__back-btn"
                        :aria-label="$tc('global.sw-page.backButton')"
                        :title="$tc('global.sw-page.backButton')"
                        :to="{ name: parentRoute }"
                        :style="{ 'color': pageColor }"
                    >
                        <sw-icon
                            name="regular-chevron-left"
                            small
                        />
                        <sw-icon
                            v-if="module && module.icon"
                            :name="module.icon"
                            small
                        />
                    </router-link>
                    {% endblock %}
                </slot>
            </div>
            {% endblock %}

            <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
            {% block sw_page_smart_bar_content %}
            <div
                class="smart-bar__content"
                :style="smartBarContentStyle"
            >
                <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                {% block sw_page_smart_bar_content_header %}
                <div class="smart-bar__header">
                    <slot name="smart-bar-header">
                        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                        {% block sw_page_slot_smart_bar_header %}
                        <h2 v-if="module && module.title">
                            {{ $t(module.title) }}
                        </h2>
                        {% endblock %}
                    </slot>
                </div>
                {% endblock %}

                <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                {% block sw_page_smart_bar_content_language_switch %}
                <div class="smart-bar__language-switch">
                    <slot name="language-switch">
                        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                        {% block sw_page_slot_language_switch%}{% endblock %}
                    </slot>
                </div>
                {% endblock %}

                <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                {% block sw_page_smart_bar_content_app_actions %}
                <sw-app-actions />
                {% endblock %}

                <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                {% block sw_page_smart_bar_content_actions %}
                <div class="smart-bar__actions">
                    <slot name="smart-bar-actions">
                        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                        {% block sw_page_slot_smart_bar_actions %}{% endblock %}
                    </slot>
                </div>
                {% endblock %}
            </div>
            {% endblock %}
        </template>
        {% endblock %}
    </div>
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_page_content %}
    <div
        ref="swPageContent"
        class="sw-page__content"
        :class="pageContentClasses"
    >
        <div
            v-if="hasSideContentSlot"
            class="sw-page__side-content"
        >
            <div class="sw-page__side-content-inner">
                <slot name="side-content">
                    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                    {% block sw_page_slot_side_content %}{% endblock %}
                </slot>
            </div>
        </div>

        <main
            id="main"
            class="sw-page__main-content"
            tabindex="-1"
        >
            <div
                class="sw-page__main-content-inner"
                v-bind="$attrs"
                v-on="additionalEventListeners"
            >
                <slot name="content">
                    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                    {% block sw_page_slot_content %}{% endblock %}
                </slot>
            </div>
        </main>

        <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
        {% block sw_page_content_sidebar %}
        <div
            v-if="hasSidebarSlot"
            class="sw-page__sidebar"
        >
            <slot name="sidebar">
                <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
                {% block sw_page_sidebar_slot %}{% endblock %}
            </slot>
        </div>
        {% endblock %}
    </div>
    {% endblock %}

</div>
{% endblock %}
