<header>
    <div class="infoline">
        <div class="container">
            <div>
                <ul class="itemlist">
                    <li class="rightbarrier">
                        <a class="text-normal" target="_blank" href="tel:{{ beGetConfig('company_phone_number') }}" alt="{{ beGetConfig('company_phone_text') }}" title="{{ beGetConfig('company_phone_text') }}" rel="nofollow noreferrer">
                            <i class="ri-phone-fill"></i>
                            {{ beGetConfig('company_phone_text') }}
                        </a>
                    </li>
                    <li class="desktop">
                        <a class="text-normal" href="mailto:{{ beGetConfig('company_mail') }}" title="Mail" alt="{{ beGetConfig('company_mail') }}" title="{{ beGetConfig('company_mail') }}" rel="nofollow noreferrer">
                            <i class="ri-mail-send-line"></i>
                            {{ str_replace('@','[@]',beGetConfig('company_mail')) }}
                        </a>
                    </li>
                </ul>
            </div>
            {{ $temp['user'] }}
        </div>
    </div>
    <div class="items">
        <div class="container">
            <div class="logo">
                <a href="{{ beGetConfig('siteurl') }}" title="{{ beGetConfig('sitename') }}">
                    <img src="{{ $be->settings['system_logo_header'] }}" width="200" height="48" title="{{ beGetConfig('sitename') }}" alt="{{ beGetConfig('sitename') }}" crossorigin="anonymous">
                </a>
            </div>
            <div class="mobile">
                <span id="beNavOpen">
                    <i class="ri-menu-line"></i>
                </span>
            </div>
            <div class="desktop">
                <nav class="headerNav">
                    <div class="beDropdownBackground">
                        <span class="beDropdownArea"></span>
                    </div>
                    <ul class="headerNavList">
                        @foreach($temp['menus']['header'] as $menu)
                        @if($menu['type'] == 'url')
                        <li>
                            <a class="text-normal" href="{{ $menu['url'] }}" title="{{ $menu['name'] }}">{{ $menu['name'] }}</a>
                        </li>
                        @endif
                        @if($menu['type'] == 'menu')
                        <li class="beHasDropdown">
                            @if($menu['adversiment'])
                                <div class="beTag {{ $menu['adversiment']['class'] }}">{{ $menu['adversiment']['text'] }}</div>
                            @endif
                            <button class="text-normal">{{ $menu['name'] }}</button>
                            <div class="beDropdown beDropdownContent">
                                <div class="beDropdownItemHeader">
                                    <span class="beHeader text-hard">
                                    {{ $menu['altname'] }}
                                    </span>
                                    <span class="beDescription text-normal">
                                    {{ $menu['description'] }}
                                    </span>
                                </div>
                                <div class="beDropdownItemCotent">
                                    <ul>
                                        @foreach($menu['altmenus'] as $altmenu)
                                        @php if(!$altmenu) continue; @endphp
                                        <li class="w-100">
                                            <a href="{{ $altmenu['url'] }}" title="{{ $menu['name'] }}">
                                                <div class="beDropdownAltItem">
                                                    <div class="beAltIcon">
                                                    @if($altmenu['icon'][0] == 'r' || $altmenu['icon'][0] == 'f')
                                                        <i class="{{ $altmenu['icon'] }}"></i>
                                                    @elseif($altmenu['icon'][0] == 'h')
                                                        <img src="{{ $altmenu['icon'] }}" width="55" height="45" alt="{{ $altmenu['name'] }}">
                                                    @elseif($altmenu['icon'][0])
                                                        <img src="{{ beGetConfig('siteurl') }}/{{ $altmenu['icon'] }}" width="55" height="45" alt="{{ $altmenu['name'] }}">
                                                    @endif
                                                    </div>
                                                    <div class="beAltText">
                                                        <span class="beHeader text-hard">
                                                        {{ $altmenu['name'] }}
                                                        </span>
                                                        <span class="beDescription text-normal">
                                                        {{ $altmenu['description'] }}
                                                        </span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li>
                                        @endforeach
                                    </ul>
                                </div>
                            </div>
                        </li>
                        @endif
                        @endforeach
                        @if($temp['cart'])
                        <li>
                            <a class="text-normal" href="{{ beGetRoute('cart.show') }}" alt="Sepetim" title="Sepetim">
                                <i class="ri-shopping-cart-2-line"></i>
                                Sepetim ({{ count($temp['cart']) }})
                            </a>
                        </li>
                        @endif
                    </ul>
                </nav>
            </div>
        </div>
    </div>
    {{ $temp['contentup'] }}
    {{ $temp['contact'] }}
</header>
<div class="beMobileNav">
    <div class="nav-header">
        <div class="logo">
            <a href="{{ beGetConfig('siteurl') }}" alt="{{ beGetConfig('sitename') }}" title="{{ beGetConfig('sitename') }}">
                <img src="{{ $be->settings['system_logo_header_mini'] }}" width="160" height="48" alt="{{ beGetConfig('sitename') }} title="{{ beGetConfig('sitename') }}" crossorigin="anonymous">
            </a>
        </div>
        <div class="name">{{ beGetConfig('sitename') }}</div>
        <div class="close" id="beNavClose">
            <i class="ri-close-line"></i>
        </div>
    </div>
    <div class="nav-content">
        <ul>
            @foreach($temp['menus']['header'] as $menu)
            @if($menu['type'] == 'url')
            <li>
                <a href="{{ $menu['url'] }}" alt="{{ $menu['name'] }}" title="{{ $menu['name'] }}">
                    <div>
                        <span>{{ $menu['name'] }}</span>
                    </div>
                </a>
            </li>
            @endif
            @if($menu['type'] == 'menu')
            <li>
                <a href="#" class="bmenu-altmenu-button" alt="{{ $menu['name'] }}" title="{{ $menu['name'] }}">
                    <div>
                        <span>{{ $menu['name'] }}</span>
                    </div>
                    <div>
                        <i class="ri-arrow-down-s-line"></i>
                    </div>
                </a>
                <div class="bmenu-altmenu">
                    <ul>
                        @foreach($menu['altmenus'] as $altmenu)
                        @php if(!$altmenu) continue; @endphp
                        <li>
                            <a href="{{ $altmenu['url'] }}" alt="{{ $menu['name'] }}" title="{{ $menu['name'] }}">
                                <div>
                                    @if($altmenu['icon'][0] == 'r')
                                        <i class="{{ $altmenu['icon'] }}"></i>
                                    @endif
                                    <span>{{ $altmenu['name'] }}</span>
                                </div>
                            </a>
                        </li>
                        @endforeach
                    </ul>
                </div>
            </li>
            @endif
            @endforeach
            @if($be->user['uid'])
            <li>
                <a href="{{ beGetRoute('client.dashboard') }}" title="Hesabım" alt="Hesabım">
                    <div>
                        <span>                
                            Hesabım
                            @if($be->settings['system_localmoney']) 
                            ({{ $be->user['money'].' '.$be->user['currency']['cicon'] }}) 
                            @endif
                        </span>
                    </div>
                </a>
            </li>
            <li>
                <a href="{{ beGetRoute('client.userproduct.userproducts') }}" title="Hesabım" alt="Hesabım">
                    <div>
                        <span>Hizmetlerim</span>
                    </div>
                </a>
            </li>
            <li>
                <a href="{{ beGetRoute('auth.logout') }}" title="Hesabım" alt="Hesabım">
                    <div>
                        <span>Çıkış</span>
                    </div>
                </a>
            </li>
            @else
            <li>
                <a href="{{ beGetRoute('auth.login') }}" title="Hesabım" alt="Hesabım">
                    <div>
                        <span><i class="ri-logout-box-line"></i> Giriş</span>
                    </div>
                </a>
            </li>
            <li>
                <a href="{{ beGetRoute('auth.register') }}" title="Hesabım" alt="Hesabım">
                    <div>
                        <span><i class="ri-user-add-line"></i> Kayıt</span>
                    </div>
                </a>
            </li>
            @endif
        </ul>
    </div>
</div>