

<?php $__env->startSection('title', 'Duas'); ?>

<?php $__env->startSection('content'); ?>
<div class="page-content">
    <div class="container-fluid">
        <!-- Page Title -->
        <div class="row">
            <div class="col-12">
                <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                    <h4 class="mb-sm-0">Duas</h4>
                    <div class="page-title-right">
                        <ol class="breadcrumb m-0">
                            <li class="breadcrumb-item"><a href="<?php echo e(route('home')); ?>">Home</a></li>
                            <li class="breadcrumb-item active">Duas</li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12">
                <div class="card border-0 shadow-sm">
                    <div class="card-header bg-transparent border-bottom">
                        <div class="d-flex justify-content-between align-items-center">
                            <h5 class="card-title mb-0">
                                <i class="ri-bookmark-line text-primary me-2"></i> All Duas
                                <span class="badge bg-soft-primary text-primary ms-2"><?php echo e($duas->count()); ?></span>
                            </h5>
                            <a href="<?php echo e(route('duas.create')); ?>" class="btn btn-primary btn-sm">
                                <i class="ri-add-line me-1"></i> Add Dua
                            </a>
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table table-hover align-middle mb-0">
                                <thead class="table-light">
                                    <tr>
                                        <th style="width: 60px;">ID</th>
                                        <th>Title</th>
                                        <th>Dua</th>
                                        <th>Translation</th>
                                        <th>Category</th>
                                        <th style="width: 100px;">Image</th>
                                        <th style="width: 150px;">Actions</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $__empty_1 = true; $__currentLoopData = $duas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dua): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr class="table-row-hover">
                                        <td>
                                            <span class="badge bg-primary rounded-pill"><?php echo e($dua->id); ?></span>
                                        </td>
                                        <td>
                                            <strong class="text-dark"><?php echo e($dua->title); ?></strong>
                                        </td>
                                        <td>
                                            <span class="text-muted"><?php echo e(\Illuminate\Support\Str::limit($dua->dua, 50)); ?></span>
                                        </td>
                                        <td>
                                            <span class="text-muted"><?php echo e(\Illuminate\Support\Str::limit($dua->translation, 50)); ?></span>
                                        </td>
                                        <td>
                                            <span class="badge bg-soft-info text-info">
                                                <i class="ri-bookmark-line me-1"></i><?php echo e($dua->category->name); ?>

                                            </span>
                                        </td>
                                        <td>
                                            <?php if($dua->image): ?>
                                                <img src="<?php echo e(asset('storage/' . $dua->image)); ?>" alt="Dua Image" 
                                                     class="img-thumbnail rounded" style="width: 50px; height: 50px; object-fit: cover;">
                                            <?php else: ?>
                                                <span class="badge bg-soft-secondary text-secondary">
                                                    <i class="ri-image-line"></i>
                                                </span>
                                            <?php endif; ?>
                                        </td>
                                        <td>
                                            <div class="d-flex gap-2">
                                                <a href="<?php echo e(route('duas.edit', $dua->id)); ?>" 
                                                   class="btn btn-sm btn-warning rounded-pill" title="Edit">
                                                    <i class="ri-pencil-line"></i>
                                                </a>
                                                <form action="<?php echo e(route('duas.destroy', $dua->id)); ?>" method="POST" class="d-inline">
                                                    <?php echo csrf_field(); ?>
                                                    <?php echo method_field('DELETE'); ?>
                                                    <button type="submit" class="btn btn-sm btn-danger rounded-pill" 
                                                            onclick="return confirm('Are you sure you want to delete this dua?')" title="Delete">
                                                        <i class="ri-delete-bin-line"></i>
                                                    </button>
                                                </form>
                                            </div>
                                        </td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr>
                                        <td colspan="7" class="text-center py-5">
                                            <div class="text-muted">
                                                <i class="ri-inbox-line fs-1 d-block mb-2"></i>
                                                No duas found
                                            </div>
                                        </td>
                                    </tr>
                                    <?php endif; ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<?php $__env->startPush('styles'); ?>
<style>
    .table-row-hover:hover {
        background-color: #f8f9fa;
        transition: background-color 0.2s ease;
    }
</style>
<?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/macbookpro/Downloads/mulikat/resources/views/duas/index.blade.php ENDPATH**/ ?>