<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <!-- Header -->
    <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between mb-6">
        <div>
            <h2 class="text-2xl font-bold text-slate-800">Notifikasi</h2>
            <p class="text-slate-500 mt-1">Pemberitahuan dan peringatan penting</p>
        </div>
        <?php if(isset($notifications) && $notifications->count() > 0): ?>
            <form action="<?php echo e(route('notifications.mark-all-read')); ?>" method="POST" class="mt-3 sm:mt-0">
                <?php echo csrf_field(); ?>
                <button type="submit" class="inline-flex items-center px-4 py-2 border border-teal-200 text-teal-700 text-sm font-medium rounded-xl hover:bg-teal-50 transition">
                    <i class="fas fa-check-double mr-2"></i>
                    Tandai Semua Dibaca
                </button>
            </form>
        <?php endif; ?>
    </div>

    <!-- Notifications List -->
    <div class="bg-white border border-slate-100 rounded-2xl shadow-sm overflow-hidden">
        <?php $__empty_1 = true; $__currentLoopData = $notifications ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $notification): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <div class="px-4 sm:px-6 py-4 border-b border-slate-100 last:border-0 <?php echo e($notification->read_at ? 'opacity-60 bg-slate-50' : ''); ?> hover:bg-slate-50 transition">
                <div class="flex items-start gap-4">
                    <div class="flex-shrink-0">
                        <?php switch($notification->type):
                            case ('budget_alert'): ?>
                                <div class="w-10 h-10 sm:w-12 sm:h-12 rounded-xl bg-rose-100 flex items-center justify-center">
                                    <i class="fas fa-exclamation text-rose-600"></i>
                                </div>
                                <?php break; ?>
                            <?php case ('goal_achieved'): ?>
                                <div class="w-10 h-10 sm:w-12 sm:h-12 rounded-xl bg-emerald-100 flex items-center justify-center">
                                    <i class="fas fa-trophy text-emerald-600"></i>
                                </div>
                                <?php break; ?>
                            <?php case ('bill_reminder'): ?>
                                <div class="w-10 h-10 sm:w-12 sm:h-12 rounded-xl bg-amber-100 flex items-center justify-center">
                                    <i class="fas fa-clock text-amber-600"></i>
                                </div>
                                <?php break; ?>
                            <?php default: ?>
                                <div class="w-10 h-10 sm:w-12 sm:h-12 rounded-xl bg-teal-100 flex items-center justify-center">
                                    <i class="fas fa-bell text-teal-600"></i>
                                </div>
                        <?php endswitch; ?>
                    </div>
                    <div class="flex-1 min-w-0">
                        <p class="font-semibold text-slate-800"><?php echo e($notification->title); ?></p>
                        <p class="text-sm text-slate-600 mt-1"><?php echo e($notification->message); ?></p>
                        <p class="text-xs text-slate-400 mt-2">
                            <i class="fas fa-clock mr-1"></i>
                            <?php echo e($notification->created_at->diffForHumans()); ?>

                        </p>
                    </div>
                    <div class="flex items-center space-x-2 flex-shrink-0">
                        <?php if (! ($notification->read_at)): ?>
                            <form action="<?php echo e(route('notifications.mark-read', $notification)); ?>" method="POST">
                                <?php echo csrf_field(); ?>
                                <button type="submit" class="w-8 h-8 flex items-center justify-center rounded-lg text-slate-400 hover:text-teal-600 hover:bg-teal-50 transition" title="Tandai dibaca">
                                    <i class="fas fa-check"></i>
                                </button>
                            </form>
                        <?php endif; ?>
                        <form action="<?php echo e(route('notifications.destroy', $notification)); ?>" method="POST">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('DELETE'); ?>
                            <button type="submit" class="w-8 h-8 flex items-center justify-center rounded-lg text-slate-400 hover:text-rose-600 hover:bg-rose-50 transition" title="Hapus">
                                <i class="fas fa-times"></i>
                            </button>
                        </form>
                    </div>
                </div>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <div class="px-6 py-12 text-center">
                <div class="w-20 h-20 bg-slate-100 rounded-2xl flex items-center justify-center mx-auto mb-4">
                    <i class="fas fa-bell-slash text-slate-300 text-3xl"></i>
                </div>
                <h3 class="text-lg font-semibold text-slate-800 mb-2">Tidak ada notifikasi</h3>
                <p class="text-slate-500">Semua sudah terbaca!</p>
            </div>
        <?php endif; ?>

        <?php if(isset($notifications) && $notifications->hasPages()): ?>
            <div class="px-6 py-4 border-t border-slate-100">
                <?php echo e($notifications->links()); ?>

            </div>
        <?php endif; ?>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\mymoney-app\resources\views\notifications\index.blade.php ENDPATH**/ ?>