<div x-data="{showNotificationModal : false}">
    <?php if (isset($component)) { $__componentOriginal5c29929acf227acd7c5fa56a39e71fcc = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5c29929acf227acd7c5fa56a39e71fcc = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.loading-spinner','data' => ['wire:target' => 'loadMore']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('loading-spinner'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['wire:target' => 'loadMore']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5c29929acf227acd7c5fa56a39e71fcc)): ?>
<?php $attributes = $__attributesOriginal5c29929acf227acd7c5fa56a39e71fcc; ?>
<?php unset($__attributesOriginal5c29929acf227acd7c5fa56a39e71fcc); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5c29929acf227acd7c5fa56a39e71fcc)): ?>
<?php $component = $__componentOriginal5c29929acf227acd7c5fa56a39e71fcc; ?>
<?php unset($__componentOriginal5c29929acf227acd7c5fa56a39e71fcc); ?>
<?php endif; ?>
    <div class=" relative">
        <button class=" text-2xl lg:text-3xl" @click="showNotificationModal = true">
            <span class="fa fa-bell text-[#1400FB]"></span>
        </button>
        <!--[if BLOCK]><![endif]--><?php if(auth()->user()->unreadNotifications->isNotEmpty()): ?>
        <span class=" block w-3 h-3 bg-red-700 rounded-full absolute top-0 right-0"></span>
        <?php endif; ?> <!--[if ENDBLOCK]><![endif]-->
    </div>

    <div x-show="showNotificationModal" x-cloak x-transition class="fixed bg-gray-50 z-30 left-0 top-0 h-full w-full p-4 overflow-y-auto">
        <div class="flex items-center justify-between ">
            <h3 class="text-xl font-bold">Notifications</h3>
            <button class=" text-3xl" @click="showNotificationModal = false">
                <span class="fa fa-close"></span>
            </button>
        </div>

        <div class=" mt-3 mb-4 flex justify-end items-center">

            <button class=" sec-btn  rounded shadow-sm bg-white text-xs" wire:click='markAllAsRead'>
                <span class=" fa fa-broom mr-2"></span> Mark All as Read
            </button>
        </div>

        <div class=" space-y-3 mt-6">
            <!--[if BLOCK]><![endif]--><?php $__empty_1 = true; $__currentLoopData = $notifications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $notification): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <div wire:click="markAsRead('<?php echo e($notification->id); ?>')" class="<?php echo \Illuminate\Support\Arr::toCssClasses(['block rounded p-3 cursor-pointer text-sm flex items-center gap-2', 'bg-blue-50 text-blue-700 border-l-2 border-blue-600'=> !$notification->read_at, 'bg-white'=> $notification->read_at]); ?>">
                <div class=" h-10 w-10 rounded-full bg-blue-200 flex items-center justify-center flex-shrink-0">
                    <!--[if BLOCK]><![endif]--><?php if(isset($notification->data['topic'])): ?>
                    <?php if (isset($component)) { $__componentOriginal475979f20e387452a9fc00a22c731968 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal475979f20e387452a9fc00a22c731968 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.render-notification-icon','data' => ['type' => $notification->data['topic']]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('render-notification-icon'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($notification->data['topic'])]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal475979f20e387452a9fc00a22c731968)): ?>
<?php $attributes = $__attributesOriginal475979f20e387452a9fc00a22c731968; ?>
<?php unset($__attributesOriginal475979f20e387452a9fc00a22c731968); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal475979f20e387452a9fc00a22c731968)): ?>
<?php $component = $__componentOriginal475979f20e387452a9fc00a22c731968; ?>
<?php unset($__componentOriginal475979f20e387452a9fc00a22c731968); ?>
<?php endif; ?>
                    <?php else: ?>
                    <?php if (isset($component)) { $__componentOriginal643fe1b47aec0b76658e1a0200b34b2c = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal643fe1b47aec0b76658e1a0200b34b2c = $attributes; } ?>
<?php $component = BladeUI\Icons\Components\Svg::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('lucide-bell'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(BladeUI\Icons\Components\Svg::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => ' h-5 text-primary']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal643fe1b47aec0b76658e1a0200b34b2c)): ?>
<?php $attributes = $__attributesOriginal643fe1b47aec0b76658e1a0200b34b2c; ?>
<?php unset($__attributesOriginal643fe1b47aec0b76658e1a0200b34b2c); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal643fe1b47aec0b76658e1a0200b34b2c)): ?>
<?php $component = $__componentOriginal643fe1b47aec0b76658e1a0200b34b2c; ?>
<?php unset($__componentOriginal643fe1b47aec0b76658e1a0200b34b2c); ?>
<?php endif; ?>
                    <?php endif; ?> <!--[if ENDBLOCK]><![endif]-->
                </div>
                <div>
                    <p class=" font-medium "><?php echo e(ucfirst(str_replace('_', ' ', $notification->data['topic'] ?? 'Notification'))); ?></p>
                    <p class="  text-gray-700 mt-1"><?php echo e($notification->data['message'] ?? ''); ?></p>
                </div>
            </div>

            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>

            <div class=" p-4 flex justify-center items-center">
                You have no pending Notifications
            </div>

            <?php endif; ?> <!--[if ENDBLOCK]><![endif]-->
        </div>

        <!--[if BLOCK]><![endif]--><?php if($notifications->hasMorePages()): ?>
        <div class=" p-4 lg:p-8 w-full flex justify-center items-center">
            <?php if (isset($component)) { $__componentOriginal3b0e04e43cf890250cc4d85cff4d94af = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal3b0e04e43cf890250cc4d85cff4d94af = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.secondary-button','data' => ['wire:click' => 'loadMore','class' => ' rounded-md']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('secondary-button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['wire:click' => 'loadMore','class' => ' rounded-md']); ?>
                Load More ...
             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal3b0e04e43cf890250cc4d85cff4d94af)): ?>
<?php $attributes = $__attributesOriginal3b0e04e43cf890250cc4d85cff4d94af; ?>
<?php unset($__attributesOriginal3b0e04e43cf890250cc4d85cff4d94af); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal3b0e04e43cf890250cc4d85cff4d94af)): ?>
<?php $component = $__componentOriginal3b0e04e43cf890250cc4d85cff4d94af; ?>
<?php unset($__componentOriginal3b0e04e43cf890250cc4d85cff4d94af); ?>
<?php endif; ?>
        </div>
        <?php endif; ?> <!--[if ENDBLOCK]><![endif]-->

    </div>
</div><?php /**PATH C:\Users\Code brain\fitPay\resources\views/livewire/user-notifications.blade.php ENDPATH**/ ?>