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

<f:layout name="{f:if(condition: treeEnabled, then: 'ElementBrowserWithNavigation', else: 'ElementBrowser')}" />

<f:section name="Navigation">
    <f:if condition="{tree}">
        <f:then>
            <div class="element-browser-body">
                {tree -> f:format.raw()}
            </div>
        </f:then>
        <f:else>
            <typo3-backend-component-filestorage-browser
                class="scaffold-content-navigation-component"
                active-folder="{f:if(condition: activeFolder, then: activeFolder.combinedIdentifier, else: '') -> f:format.htmlentities()}"
            >
            </typo3-backend-component-filestorage-browser>
        </f:else>
    </f:if>
</f:section>

<f:section name="Content">
    <h4 class="text-truncate p-0 mb-4">{selectedFolderIcon -> f:format.raw()} {selectedFolder.storage.name}: {selectedFolder.identifier}</h4>
    <f:flashMessages queueIdentifier="core.template.flashMessages"/>
    <f:format.raw>{content}</f:format.raw>
</f:section>

</html>
