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

    <!-- LOGO -->
    <div class="topbar-left">
        <a href="javascript:void(0);" class="logo">
                    <span>
                        <img src="<?php echo e(asset('assets/images/logo.png')); ?>" alt="" height="25">
                    </span>
            <i>
                <img src="<?php echo e(asset('assets/images/logo_sm.png')); ?>" alt="" height="28">
            </i>
        </a>
    </div>

    <nav class="navbar-custom">

        <ul class="list-inline float-right mb-0">
          
            
            <li class="list-inline-item dropdown notification-list">
                <a class="nav-link dropdown-toggle arrow-none waves-light waves-effect" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
                    <i class="dripicons-bell noti-icon"></i>
                    <span class="badge badge-pink noti-icon-badge"><?php echo e(get_count_notifications()); ?></span>
                </a>
                <div class="dropdown-menu dropdown-menu-right dropdown-arrow dropdown-lg" aria-labelledby="Preview" style="height:400px; overflow-x:hidden;">
                    <!-- item-->
                    <div class="dropdown-item noti-title">
                        <h5><span class="badge badge-danger float-right"><?php echo e(get_count_notifications()); ?></span>Notification</h5>
                    </div>

                    <?php if(!empty(get_list_notifications())): ?>    
                    <!-- item-->
                    <?php $__currentLoopData = get_list_notifications(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $nttop): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <a href="<?php echo e(route('notification.view',$nttop->id)); ?>" class="dropdown-item notify-item">
                        <div class="notify-icon bg-success"><i class="icon-bubble"></i></div>
                        <p class="notify-details"><?php echo e(substr($nttop->message, 0,20).'..'); ?><small class="text-muted"><?php echo e(date('m-d-Y H:i a',strtotime($nttop->created_at))); ?></small></p>
                    </a>
                    <?php echo e(read_status($nttop->id)); ?>

                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    
                    <!-- All-->
                    <a href="<?php echo e(route('notification.manage')); ?>" class="dropdown-item notify-item notify-all">
                        View All
                    </a>
                    <?php endif; ?>
                    

                    

                </div>
            </li>
            
            <li class="list-inline-item dropdown notification-list">
                <a class="nav-link dropdown-toggle waves-effect waves-light nav-user" data-toggle="dropdown" href="#" role="button"
                   aria-haspopup="false" aria-expanded="false">
                    <?php if(Auth::user()->picture !=""): ?>
                    <img src="<?php echo e(asset('uploads/profile/'.Auth::user()->picture)); ?>" alt="<?php echo e(Auth::user()->name); ?>" class="rounded-circle">
                    <?php else: ?>
                    <img src="<?php echo e(asset('assets/images/blank.jpg')); ?>" alt="<?php echo e(Auth::user()->name); ?>" class="rounded-circle">
                    <?php endif; ?>
                </a>
                <div class="dropdown-menu dropdown-menu-right profile-dropdown " aria-labelledby="Preview">
                    <!-- item-->
                    <div class="dropdown-item noti-title">
                        <h5 class="text-overflow"><small>Welcome ! <?php echo e(Auth::user()->name); ?></small> </h5>
                    </div>

                    <!-- item-->
                    <?php if(Auth::user()->role == "1"): ?>
                    <a href="<?php echo e(route('admin.profile')); ?>" class="dropdown-item notify-item">
                        <i class="zmdi zmdi-account-circle"></i> <span>Profile</span>
                    </a>
                    <?php elseif(Auth::user()->role == "2"): ?>
                    <a href="<?php echo e(route('customer.profile')); ?>" class="dropdown-item notify-item">
                        <i class="zmdi zmdi-account-circle"></i> <span>Profile</span>
                    </a>
                    <?php endif; ?>
                    

                    <!-- item-->
                    <a href="<?php echo e(route('logout')); ?>" class="dropdown-item notify-item" onclick="event.preventDefault();
                                                 document.getElementById('logout-form').submit();">
                        <i class="zmdi zmdi-power"></i> <span>Logout</span>
                    </a>
                    <form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST" style="display: none;">
                        <?php echo e(csrf_field()); ?>

                    </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="dripicons-menu"></i>
                </button>
            </li>
            
        </ul>

    </nav>

</div>
<!-- Top Bar End --><?php /**PATH /home/aerocodex/public_html/crm/project/resources/views/widget/topbar.blade.php ENDPATH**/ ?>