<header id="header-area">
    <div class="header-top">
        <nav class="navbar navbar-expand-lg navbar-dark">
            <div class="container">
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
                        aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse" id="navbarNav">
                    <ul class="navbar-nav mr-auto">
                        <li class="nav-item">
                            <a class="nav-link" href="{{ path('coreshop_index') }}">
                                {{ 'coreshop.ui.home'|trans }}
                            </a>
                        </li>
                        {{ render(controller('CoreShop\\Bundle\\FrontendBundle\\Controller\\CustomerController::headerAction')) }}
                    </ul>
                    <ul class="navbar-nav">
                        {% if is_granted('CORESHOP_WISHLIST') %}
                            <li class="nav-item">
                                <a class="nav-link" href="{{ path('coreshop_wishlist_summary') }}">
                                    {{ 'coreshop.ui.wishlist'|trans }}
                                </a>
                            </li>
                        {% endif %}
                        {% if is_granted('CORESHOP_CURRENCY_SWITCH') %}
                            <li class="nav_item">
                                {{ render(controller('CoreShop\\Bundle\\FrontendBundle\\Controller\\CurrencyController::widgetAction')) }}
                            </li>
                        {% endif %}
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" href="#" id="languageDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                {{ 'coreshop.ui.language'|trans }}
                            </a>
                            <div class="dropdown-menu" aria-labelledby="languageDropdown">
                                {% for document in coreshop_locale_switcher(document) %}
                                    <a class="dropdown-item" href="{{ document.target }}">{{ document.language }}</a>
                                {% endfor %}
                            </div>
                        </li>
                    </ul>

                </div>
            </div>
        </nav>
    </div>

    <div class="main-header">
        <div class="container">
            <div class="row">
                {{ render(controller('CoreShop\\Bundle\\FrontendBundle\\Controller\\SearchController::widgetAction')) }}

                <div class="col-md-6">
                    <div id="logo">
                        <a href="{{ path('coreshop_index') }}">
                            <img src="{{ asset('bundles/coreshopfrontend/static/images/logo-full.svg') }}" title="CoreShop" alt="CoreShop" class="img-fluid" width="300"/>
                        </a>
                    </div>
                </div>

                {% if is_granted('CORESHOP_CART') %}
                    <div class="col-md-3 p-sm-2">
                        {{ render(controller('CoreShop\\Bundle\\FrontendBundle\\Controller\\CartController::widgetAction')) }}
                    </div>
                {% endif %}
            </div>
        </div>
    </div>

    {% if is_granted('CORESHOP_CATEGORY_SHOW') %}
        {{ render(controller('CoreShop\\Bundle\\FrontendBundle\\Controller\\CategoryController::menuAction')) }}
    {% endif %}
</header>
