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

<f:layout name="Default"/>

<f:section name="content">
    <h1>
        <f:translate key="title_import"/>
    </h1>

    <ul class="nav nav-tabs" role="tablist">
        <li role="presentation" class="nav-item">
            <a class="nav-link text-capitalize active" href="#import-import" aria-controls="import-import" role="tab"
                data-bs-toggle="tab">
                <f:translate key="importdata_import" />
            </a>
        </li>
        <f:if condition="{importFolder}">
            <li role="presentation" class="nav-item">
                <a class="nav-link text-capitalize" href="#import-upload" aria-controls="import-upload" role="tab"
                    data-bs-toggle="tab">
                    <f:translate key="importdata_upload" />
                </a>
            </li>
        </f:if>
        <f:if condition="{import.metaData}">
            <li role="presentation" class="nav-item">
                <a class="nav-link text-capitalize" href="#import-metadata" aria-controls="import-metadata" role="tab"
                    data-bs-toggle="tab">
                    <f:translate key="importdata_metaData_1387" />
                </a>
            </li>
        </f:if>
        <f:if condition="{errors -> f:count()} > 0">
            <li role="presentation" class="nav-item">
                <a class="nav-link text-capitalize" href="#import-errors" aria-controls="import-errors" role="tab"
                    data-bs-toggle="tab">
                    <f:translate key="importdata_messages" />
                    <core:icon identifier="status-dialog-warning" />
                </a>
            </li>
        </f:if>
    </ul>
    <div class="tab-content">
        <div role="tabpanel" class="tab-pane active" id="import-import">
            <div class="panel panel-tab">
                <div class="panel-body">
                    <f:render partial="Import/Import" arguments="{_all}"/>
                </div>
            </div>
        </div>
        <f:if condition="{importFolder}">
            <div role="tabpanel" class="tab-pane" id="import-upload">
                <div class="panel panel-tab">
                    <div class="panel-body">
                        <f:render partial="Import/Upload" arguments="{_all}"/>
                    </div>
                </div>
            </div>
        </f:if>
        <f:if condition="{import.metaData}">
            <div role="tabpanel" class="tab-pane" id="import-metadata">
                <div class="panel panel-tab">
                    <div class="panel-body">
                        <f:render partial="Import/MetaData" arguments="{_all}"/>
                    </div>
                </div>
            </div>
        </f:if>
        <f:if condition="{errors -> f:count()} > 0">
            <div role="tabpanel" class="tab-pane" id="import-errors">
                <div class="panel panel-tab">
                    <div class="panel-body">
                        <div class="callout callout-danger">
                            <f:for each="{errors}" as="error">
                                <p>{error}</p>
                            </f:for>
                        </div>
                    </div>
                </div>
            </div>
        </f:if>
    </div>

    <f:render partial="Preview" arguments="{_all}"/>
</f:section>

</html>
