<?php $__env->startSection('title', 'Notifications'); ?>
<?php $__env->startSection('breadcrumb'); ?>
    <span style="font-weight:600;color:var(--text-primary);">Notifications</span>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="page-header">
        <h1>🔔 Notifications</h1>
        <div class="page-header-actions">
            <form method="POST" action="<?php echo e(route('notifications.read-all')); ?>">
                <?php echo csrf_field(); ?>
                <button type="submit" class="btn btn-secondary btn-sm">Mark All as Read</button>
            </form>
        </div>
    </div>

    <div class="card">
        <div>
            <?php $__empty_1 = true; $__currentLoopData = $notifications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $notification): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <div class="task-item" style="<?php echo e(!$notification->read_at ? 'background:rgba(99,102,241,0.05);border-left:3px solid var(--accent-primary);' : ''); ?>">
                    <div class="activity-icon" style="width:36px;height:36px;">
                        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width:16px;height:16px;color:<?php echo e(!$notification->read_at ? 'var(--accent-primary)' : 'var(--text-tertiary)'); ?>;"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>
                    </div>
                    <div class="task-info">
                        <?php $data = is_string($notification->data) ? json_decode($notification->data, true) : $notification->data; ?>
                        <div class="task-title"><?php echo e($data['title'] ?? 'Notification'); ?></div>
                        <div class="text-xs text-muted"><?php echo e($data['message'] ?? ''); ?></div>
                        <div class="text-xs text-muted mt-1"><?php echo e($notification->created_at->diffForHumans()); ?></div>
                    </div>
                    <?php if(!$notification->read_at): ?>
                        <form method="POST" action="<?php echo e(route('notifications.read', $notification->id)); ?>">
                            <?php echo csrf_field(); ?> <?php echo method_field('PATCH'); ?>
                            <button type="submit" class="btn btn-ghost btn-sm">Mark Read</button>
                        </form>
                    <?php endif; ?>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <div class="empty-state">
                    <div class="empty-state-icon">
                        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>
                    </div>
                    <div class="empty-state-title">No notifications</div>
                    <div class="empty-state-text">You're all caught up!</div>
                </div>
            <?php endif; ?>
        </div>
    </div>
    <?php if($notifications->hasPages()): ?>
        <div class="pagination"><?php echo e($notifications->links()); ?></div>
    <?php endif; ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/XAMPP/xamppfiles/htdocs/asana/resources/views/notifications/index.blade.php ENDPATH**/ ?>