<?php
$routeName = request()->route()->getName();
$currentMenu = \Illuminate\Support\Facades\Request::segment(4);
#dump($user);
?>


<nav id="sidebarMenu" class="d-md-block bg-light sidebar collapse px-0">
    <div class="sidebar-sticky pt-3">
        <ul class="nav flex-column mcp-theme-1">

            <li class="nav-item">
                <a class="nav-link {{\Illuminate\Support\Facades\Route::getCurrentRoute()->getName() === 'admin.users.view.dashboard' ? 'active' : ''}}"
                   href="{{ route('admin.users.view.dashboard', $user) }}">Dashboard</a>
            </li>
            @if($user->is_interested_in_rep)
                <li class="nav-item">
                    <a class="nav-link {{\Illuminate\Support\Facades\Route::getCurrentRoute()->getName() === 'admin.users.view.hr' ? 'active' : ''}}"
                    href="{{ route('admin.users.view.hr', $user) }}">HR Profile</a>
                </li>
            @endif
            <li class="nav-item heading">
                Client
            </li>
            <li class="nav-item ps-2">
                <a class="nav-link {{\Illuminate\Support\Facades\Route::getCurrentRoute()->getName() === 'admin.users.view.orders' ? 'active' : ''}}"
                   href="{{ route('admin.users.view.orders', $user) }}">Orders as Client</a>
            </li>
            <li class="nav-item ps-2">
                <a class="nav-link {{\Illuminate\Support\Facades\Route::getCurrentRoute()->getName() === 'admin.users.view.transactions' ? 'active' : ''}}"
                   href="{{ route('admin.users.view.transactions', $user) }}">Financial Transactions</a>
            </li>
            <li class="nav-item ps-2">
                <a class="nav-link {{\Illuminate\Support\Facades\Route::getCurrentRoute()->getName() === 'admin.users.view.sessions' ? 'active' : ''}}"
                   href="{{ route('admin.users.view.sessions', $user) }}">Sessions</a>
            </li>
            <li class="nav-item ps-2">
                <a class="nav-link {{\Illuminate\Support\Facades\Route::getCurrentRoute()->getName() === 'admin.users.view.payment-methods' ? 'active' : ''}}"
                   href="{{ route('admin.users.view.payment-methods', $user) }}">Payment Methods</a>
            </li>
            <li class="nav-item ps-2">
                <a class="nav-link {{\Illuminate\Support\Facades\Route::getCurrentRoute()->getName() === 'admin.users.view.messages' ? 'active' : ''}}"
                   href="{{ route('admin.users.view.messages', $user) }}">Messages</a>
            </li>
            <li class="nav-item ps-2">
                <a class="nav-link {{\Illuminate\Support\Facades\Route::getCurrentRoute()->getName() === 'admin.users.view.user-events' ? 'active' : ''}}"
                   href="{{ route('admin.users.view.user-events', $user) }}">User Events</a>
            </li>
        </ul>
    </div>
</nav>
