<div class="content-page">
    <!-- Start content -->
    <div class="content">

        <!-- Top Bar Start -->
        <div class="topbar">

            <nav class="navbar-custom">

                <ul class="list-inline float-right mb-0">
                    <!-- language-->
                    <li class="list-inline-item hide-phone app-search">
                        <form role="search" class="">
                            <input type="text" placeholder="Search..." class="form-control">
                            <a href=""><i class="fa fa-search"></i></a>
                        </form>
                    </li>
                    <li class="list-inline-item dropdown notification-list hide-phone">
                        <a class="nav-link dropdown-toggle arrow-none waves-effect text-white" data-toggle="dropdown" href="#" role="button"
                            aria-haspopup="false" aria-expanded="false">
                            <img src="assets/images/flags/us_flag.jpg" class="ml-2" height="16" alt=""/>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right language-switch">
                            <a class="dropdown-item" href="#"><img src="assets/images/flags/italy_flag.jpg" alt="" height="16"/><span> Italian </span></a>
                            <a class="dropdown-item" href="#"><img src="assets/images/flags/french_flag.jpg" alt="" height="16"/><span> French </span></a>
                            <a class="dropdown-item" href="#"><img src="assets/images/flags/spain_flag.jpg" alt="" height="16"/><span> Spanish </span></a>
                            <a class="dropdown-item" href="#"><img src="assets/images/flags/russia_flag.jpg" alt="" height="16"/><span> Russian </span></a>
                        </div>
                    </li>
                

                    <li class="list-inline-item dropdown notification-list">
                        <a class="nav-link dropdown-toggle arrow-none waves-effect" data-toggle="dropdown" href="#" role="button"
                           aria-haspopup="false" aria-expanded="false">
                            <i class="ti-bell noti-icon"></i>
                            <span class="badge badge-success noti-icon-badge" id="admin-notification-badge">0</span>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right dropdown-arrow dropdown-menu-lg" id="admin-notifications-dropdown">
                            <!-- item-->
                            <div class="dropdown-item noti-title">
                                <h5><span class="badge badge-danger float-right" id="admin-notification-count">0</span>Notifications</h5>
                            </div>
                            
                            <div id="admin-notifications-list">
                                <!-- Notifications will be loaded here via AJAX -->
                                <div class="dropdown-item notify-item text-center">
                                    <p class="text-muted">Loading notifications...</p>
                                </div>
                            </div>

                            <!-- All-->
                            <a href="javascript:void(0);" class="dropdown-item notify-item text-center" id="view-all-notifications" style="display: none;">
                                <strong>View All</strong>
                            </a>

                        </div>
                    </li>

                    <li class="list-inline-item dropdown notification-list">
                        <a class="nav-link dropdown-toggle arrow-none waves-effect nav-user" data-toggle="dropdown" href="#" role="button"
                           aria-haspopup="false" aria-expanded="false">
                            <?php
                                $admin = auth()->user();
                                $profilePhoto = $admin->profile_photo ?? null;
                            ?>
                            <?php if($profilePhoto && file_exists(public_path($profilePhoto))): ?>
                                <img src="<?php echo e(asset($profilePhoto)); ?>" alt="user" class="rounded-circle" style="width: 32px; height: 32px; object-fit: cover;">
                            <?php else: ?>
                                <div class="rounded-circle bg-primary text-white d-inline-flex align-items-center justify-content-center" style="width: 32px; height: 32px; font-weight: bold; font-size: 14px;">
                                    <?php echo e(strtoupper(substr($admin->name ?? 'A', 0, 1))); ?>

                                </div>
                            <?php endif; ?>
                            <span class="ml-2 text-white"><?php echo e($admin->name ?? 'Admin'); ?></span>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right profile-dropdown">
                            <!-- item-->
                            <div class="dropdown-item noti-title">
                                <h5>Welcome, <?php echo e($admin->name ?? 'Admin'); ?></h5>
                                <small class="text-muted"><?php echo e($admin->email ?? ''); ?></small>
                            </div>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="<?php echo e(route('admin.users.show', $admin->id)); ?>"><i class="mdi mdi-account-circle m-r-5 text-muted"></i> Profile</a>
                            <a class="dropdown-item" href="<?php echo e(route('admin.index')); ?>"><i class="mdi mdi-view-dashboard m-r-5 text-muted"></i> Dashboard</a>
                            <div class="dropdown-divider"></div>
                            <form action="<?php echo e(route('admin.logout')); ?>" method="POST" class="d-inline">
                                <?php echo csrf_field(); ?>
                                <button type="submit" class="dropdown-item"><i class="mdi mdi-logout m-r-5 text-muted"></i> Logout</button>
                            </form>
                        </div>
                    </li>

                </ul>

                <ul class="list-inline menu-left mb-0">
                    <li class="float-left">
                        <button class="button-menu-mobile open-left waves-light waves-effect">
                            <i class="mdi mdi-menu"></i>
                        </button>
                    </li>                                
                </ul>

                <div class="clearfix"></div>

            </nav>

        </div>
        <!-- Top Bar End --><?php /**PATH C:\laragon\www\investment\resources\views/admin/layouts/header.blade.php ENDPATH**/ ?>