<!-- Notification Items -->
<div class="dropdown-body">
    @forelse($list as $row)
        <div class="dropdown-item d-flex align-items-center" onclick="event.stopPropagation(); return false;" @if($loop->last) style="margin-bottom: 38px" @endif>
            <a href="javascript:void(0)" class="notification-details flex-grow-1"  onclick="event.stopPropagation(); @if(isset($row->link) && !empty($row->link)) window.location.href = '{{ $row->link }}'; @endif return false;">
                <p class="m-0 d-flex align-items-center">
                    <span class="fw-bold">{{ $row->title }}</span>
                    <span class="flex-grow-1"></span>
                    <span class="text-small text-muted ml-auto ms-2">{{ \Carbon\Carbon::parse($row->created_at)->diffForHumans(null,true) }} {{ __('ago')}}</span>
                </p>
                <p class="text-small text-muted m-0">{{ $row->message }}</p>
            </a>
            <div class="notification-icon ms-2">
                <i class="bi bi-trash text-danger fs-5 cursor-pointer" onclick="removeNotification('{{ basicEncrypt($row->id) }}',$(this))"></i>
            </div>
        </div>

        @empty
        <div class="dropdown-item text-center"  style="min-height:110px;">
            <p class="text-muted mb-0 mt-2 pt-4 text-center w-100">{{ __('No Data Found')}}</p>
        </div>
    @endforelse

</div>

@if(count($list))
<!-- Sticky Footer -->

    <div class="dropdown-item fixed-bottom bg-white text-center h-auto py-2 pb-3 dropdown-footer"  onclick="event.stopPropagation(); removeAllNotification($(this)); return false;">
        <p class="text-small text-danger m-0 text-center fs-6 fw-bold w-100"><i class="bi bi-trash me-1"></i> {{ __('Clear All')}}</p>
    </div>
@endif
