<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/modal.js"/>
    <f:asset.module identifier="@typo3/backend/element/editable-page-title.js"/>
    <f:asset.module identifier="@typo3/backend/element/immediate-action-element.js"/>
    <f:be.pageRenderer
        addJsInlineLabels="{
            'editablePageTitle.input.field.label': 'LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:editPageTitle.input.field.label',
            'editablePageTitle.button.edit.label': 'LLL:EXT:backend/Resources/Private/Language/locallang_layout.xlf:editPageTitle',
            'editablePageTitle.button.save.label': 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:save',
            'editablePageTitle.button.cancel.label': 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel'
        }"
    />
    <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">

    <typo3-backend-editable-page-title
        pageTitle="{localizedPageTitle}"
        pageId="{pageId}"
        localizedPageId="{localizedPageId}"
        {isPageEditable ? 'editable' : ''}
    >
        {localizedPageTitle}
    </typo3-backend-editable-page-title>

    <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>
