<style>
    .modal-dialog {
        padding: 0 6px;
    }
</style>

<div class="modal notification-modal mt-5" id="notification_modal" tabindex="-1" role="dialog" aria-labelledby="divisionEditModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <?php
                    $notifications = latest_notification(auth()->user()->id); 
                    $notificationCount = $notifications->count();
                ?>
                <?php if($notificationCount > 0): ?>
                    <h6 class="text-sm text-muted m-0" id="exampleModalLabel">
                        <i class="fe fe-bell"></i> You have <strong class="text-primary"><?php echo e($notificationCount); ?></strong> new notifications.
                    </h6>
                <?php endif; ?>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="closeNotificationModal()">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            
            <div class="list-group list-group-flush">
                <?php if($notificationCount > 0): ?>
                    <?php $__currentLoopData = $notifications->take(6); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $notification): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="list-group-item list-group-item-action">
                            <div class="d-flex justify-content-between align-items-center">
                                <div>
                                    <h4 class="mb-0 text-sm text-uppercase"><?php echo e($notification->message_title); ?></h4>
                                </div>
                            </div>
                            <p class="text-sm mb-0"><?php echo e($notification->message); ?></p>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php else: ?>
                    <div class="list-group-item list-group-item-action text-center">
                        <p>No new notifications</p>
                    </div>
                <?php endif; ?>
            </div>
            
            <?php if($notificationCount > 0): ?>
                <a href="<?php echo e(route('user.message-list')); ?>" class="dropdown-item text-center text-primary font-weight-bold py-3">Read all</a>
            <?php endif; ?>
        </div>
    </div>
</div>
<?php /**PATH /home/powerwor/public_html/resources/views/user/layouts/partials/notification-modal.blade.php ENDPATH**/ ?>