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

<f:layout name="Module" />

<f:section name="Before">
    <f:asset.module identifier="@typo3/backend/clear-cache.js"/>
    <f:asset.module identifier="@typo3/backend/new-content-element-wizard-button.js"/>
    <f:asset.module identifier="@typo3/backend/context-menu.js"/>
    <f:asset.module identifier="@typo3/backend/localization.js"/>
    <f:asset.module identifier="@typo3/backend/layout-module/drag-drop.js"/>
    <f:asset.module identifier="@typo3/backend/layout-module/velocity-scroll.js"/>
    <f:asset.module identifier="@typo3/backend/layout-module/page-layout.js"/>
    <f:asset.module identifier="@typo3/backend/modal.js"/>
    <f:asset.module identifier="@typo3/backend/element/editable-page-title.js"/>
    <f:asset.module identifier="@typo3/backend/element/contextual-record-edit-trigger.js"/>
    <f:asset.module identifier="@typo3/backend/element/qrcode-modal-button.js"/>
    <f:asset.module identifier="@typo3/backend/element/immediate-action-element.js"/>
    <f:variable name="immediateActionArgs" value="{0: 'web', 1: pageId}" />
    <typo3-immediate-action
        action="TYPO3.Backend.Storage.ModuleStateStorage.update"
        args="{immediateActionArgs -> f:format.json() -> f:format.htmlspecialchars()}"
    ></typo3-immediate-action>
</f:section>

<f:section name="Content">

    <f:if condition="!{pageLayoutContext.drawingConfiguration.languageComparisonMode}">
        <typo3-backend-editable-page-title
            pageTitle="{localizedPageTitle}"
            pageId="{pageId}"
            localizedPageId="{localizedPageId}"
            {isPageEditable ? 'editable' : ''}
        >
            {localizedPageTitle}
        </typo3-backend-editable-page-title>
    </f:if>

    <f:for each="{infoBoxes}" as="infoBox">
        <f:be.infobox state="{infoBox.state}">
            <f:format.raw>{infoBox.message}</f:format.raw>
        </f:be.infobox>
    </f:for>

    <f:format.raw>{eventContentHtmlTop}</f:format.raw>

    <form action="{f:be.uri(route:'web_layout', parameters:'{id: pageId}')}" id="PageLayoutController" method="post">
        <f:format.raw>{mainContentHtml}</f:format.raw>
    </form>

    <f:format.raw>{eventContentHtmlBottom}</f:format.raw>

</f:section>

</html>
