<html
    xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
    data-namespace-typo3-fluid="true"
>

<f:asset.module identifier="@typo3/backend/java-script-module-import-event-handler.js"/>
<f:asset.module identifier="bootstrap"/>
<f:asset.module identifier="@typo3/backend/dropdown.js"/>
<f:asset.module identifier="@typo3/backend/module/router.js"/>
<f:asset.module identifier="@typo3/backend/viewport/content-navigation.js"/>
<f:asset.module identifier="@typo3/backend/storage/module-state-storage.js"/>
<f:asset.module identifier="@typo3/backend/toolbar.js"/>
<f:asset.module identifier="@typo3/backend/notification.js"/>
<f:asset.module identifier="@typo3/backend/modal.js"/>
<f:asset.module identifier="@typo3/backend/info-window.js"/>
<f:asset.module identifier="@typo3/backend/context-menu.js"/>
<f:asset.module identifier="@typo3/backend/localization.js"/>
<f:asset.module identifier="@typo3/backend/global-event-handler.js"/>
<f:asset.module identifier="@typo3/backend/action-dispatcher.js"/>
<f:asset.module identifier="@typo3/backend/element/immediate-action-element.js"/>
<f:asset.module identifier="@typo3/backend/live-search/live-search.js"/>
<f:asset.module identifier="@typo3/backend/live-search/element/backend-search.js"/>
<f:asset.module identifier="@typo3/backend/drag-tooltip.js"/>

<div class="scaffold{f:if(condition: '{sidebar.accessible} && {sidebar.expanded}', then: ' scaffold-sidebar-expanded')}{f:if(condition: '{isImpersonated}', then: ' scaffold-in-impersonation')} t3js-scaffold">
    <div class="scaffold-state t3js-scaffold-state"></div>
    <div class="scaffold-header t3js-scaffold-header">
        <f:render partial="Backend/Topbar" arguments="{_all}" />
    </div>
    <div class="scaffold-sidebar{f:if(condition: '!{sidebar.accessible}', then: ' scaffold-sidebar-disabled')} t3js-scaffold-sidebar">
        <f:for each="{sidebar.modules}" as="module">
            <f:asset.module identifier="{module}"/>
        </f:for>
        {sidebar.html -> f:format.raw()}
    </div>
    <div class="scaffold-content t3js-scaffold-content">
        <typo3-backend-content-navigation
            identifier="backend"
            navigation-title="{f:translate(key: 'viewport.navigation', domain: 'backend.messages')}"
            navigation-label-collapse="{f:translate(key: 'viewport.navigation.hide', domain: 'backend.messages')}"
            navigation-label-expand="{f:translate(key: 'viewport.navigation.show', domain: 'backend.messages')}"
            navigation-min-width="300"
            navigation-hidden
        >
            <div slot="navigation"></div>
            <div slot="content">
                <f:if condition="{workspaceAccessDenied}">
                    <f:then>
                        <div class="m-4">
                            <f:be.infobox
                                title="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:noModuleAccess.workspace.title')}"
                                message="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:noModuleAccess.workspace.message')}"
                                state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::WARNING')}"
                            />
                        </div>
                    </f:then>
                    <f:else if="{noModuleAccess}">
                        <div class="m-4">
                            <f:be.infobox
                                title="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:noModuleAccess.permissions.title')}"
                                message="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:noModuleAccess.permissions.message')}"
                                state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::WARNING')}"
                            />
                        </div>
                    </f:else>
                    <f:else>
                        <typo3-backend-module-router
                            module="{startupModule.0}"
                            endpoint="{startupModule.1}"
                            state-tracker="{stateTracker}"
                            sitename="{sitename}"
                            {f:if(condition: sitenameFirstInBackendTitle, then: 'sitename-first')}
                        entry-point="{entryPoint}"
                        ></typo3-backend-module-router>
                    </f:else>
                </f:if>
            </div>
        </typo3-backend-content-navigation>
    </div>
    <div class="scaffold-overlay"></div>
</div>

<typo3-backend-drag-tooltip></typo3-backend-drag-tooltip>
<typo3-backend-context-menu></typo3-backend-context-menu>

</html>
