@php
    $sideBarLinks = json_decode($sidenav);
@endphp

<div class="sidebar bg--dark">
    <button class="res-sidebar-close-btn"><i class="las la-times"></i></button>
    <div class="sidebar__inner">
        <div class="sidebar__logo">
            <a href="{{ route('admin.dashboard') }}" class="sidebar__main-logo"><img src="{{ siteLogo() }}" alt="image"></a>
        </div>
        <div class="sidebar__menu-wrapper">
            <ul class="sidebar__menu">

                <li class="sidebar-menu-item {{ menuActive(@$menu->menu_active) }} ">
                    <a href="/admin/shipments" class="nav-link">
                    <i class="menu-icon las la-dot-circle"></i>
                    <span class="menu-title">All Shipments</span>
                    <span class="menu-badge bg--info ms-auto"></span></a>
                </li>
                <li class="sidebar-menu-item {{ menuActive(@$menu->menu_active) }} ">
                    <a href="/admin/add-shipments" class="nav-link">
                    <i class="menu-icon las la-dot-circle"></i>
                    <span class="menu-title">Add New Shipment</span>
                    <span class="menu-badge bg--info ms-auto"></span></a>
                </li>
                <li class="sidebar-menu-item {{ menuActive(@$menu->menu_active) }} ">
                    <a href="/admin/send-email" class="nav-link">
                    <i class="menu-icon las la-dot-circle"></i>
                    <span class="menu-title">Send Client Email</span>
                    <span class="menu-badge bg--info ms-auto"></span></a>
                </li>
                <!--<li class="sidebar-menu-item {{ menuActive(@$menu->menu_active) }} ">-->
                <!--    <a href="/admin/mails" class="nav-link">-->
                <!--    <i class="menu-icon las la-dot-circle"></i>-->
                <!--    <span class="menu-title">Available Mails</span>-->
                <!--    <span class="menu-badge bg--info ms-auto"></span></a>-->
                <!--</li>-->
        </ul>
    </div>
   
</div>
</div>
<!-- sidebar end -->

@push('script')
<script>
    if ($('li').hasClass('active')) {
        $('.sidebar__menu-wrapper').animate({
            scrollTop: eval($(".active").offset().top - 320)
        }, 500);
    }
</script>
@endpush
