{% set isIndex = tmpl == 'index' ? true : false %}
{% set tmpl = 'list' %}

{% extends isIndex ? '@MauticCore/Default/content.html.twig' : '@MauticCore/Default/raw_output.html.twig' %}
{% block mauticContent %}asset{% endblock %}
{% block headerTitle %}{% trans %}mautic.asset.remote.file.browse{% endtrans %}{% endblock %}

{% block content %}
    {% if isIndex %}
        <div id="page-list-wrapper" class="panel panel-default">
            <div class="page-list">
                {{ block('mainContent') }}
            </div>
        </div>
    {% else %}
        {{ block('mainContent') }}
    {% endif %}
{% endblock %}



{% block mainContent %}
{% if integrations|length %}
    <!-- start: box layout -->
    <div class="box-layout">
                <!-- step container -->
        <div class="col-md-3">
            <div class="pt-md pr-md pb-md">
                <ul class="list-group list-group-tabs">
                    {% for integration in integrations %}
                        <li class="list-group-item{% if loop.index0 is same as(0) %} active{% endif %}" id="tab{{ integration.getName() }}">
                            <a href="javascript: void(0);" class="list-group-item-heading steps" onclick="Mautic.updateRemoteBrowser('{{ integration.getName() }}');">
                                {{ integration.getDisplayName() }}
                            </a>
                        </li>
                    {% endfor %}
                </ul>
            </div>
        </div>
        <!--/ step container -->

        <!-- container -->
        <div class="col-md-9 bdr-l">
            <div id="remoteFileBrowser">
                <div class="alert alert-warning col-md-6 col-md-offset-3 mt-md">
                    <p>{% trans %}mautic.asset.remote.select_service{% endtrans %}</p>
                </div>
            </div>
        </div>
        <!--/ end: container -->
    </div>
    <!--/ end: box layout -->
{% endif %}
{% endblock %}