<div>
    <div>
        <div class="card mb-4">
            <div class="card-body">
                <div class="row mb-3">
                    <div class="col-md-4">
                        <label for="search" class="form-label text-muted fw-bold">Search Album:</label>
                        <input wire:model.live="search" wire:keyup="updateSearch" type="text" id="search" class="form-control" placeholder="Search albums...">
                    </div>
                </div>

                <div class="table-responsive">
                    <table class="table table-striped table-auto table-sm">
                        <thead class="bg-secondary text-white">
                            <tr>
                                <th>#ID</th>
                                <th>Cover</th>
                                <th>Album Name</th>
                                <th>Description</th>
                                <th>Actions</th>
                                <th>Manage Photos</th>
                            </tr>
                        </thead>
                        <tbody>
                            <!--[if BLOCK]><![endif]--><?php $__empty_1 = true; $__currentLoopData = $albums; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $album): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr>
                                <td><?php echo e($album->id); ?></td>
                                <td>
                                    <!--[if BLOCK]><![endif]--><?php if($album->cover_photo): ?>
                                        <img src="<?php echo e(asset('images/albums/' . $album->cover_photo)); ?>" class="img-thumbnail" style="max-width: 100px;" alt="<?php echo e($album->title); ?>">
                                    <?php else: ?>
                                        <span class="badge bg-secondary text-white">No Image</span>
                                    <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                                </td>
                                <td><?php echo e($album->title); ?></td>
                                <td><?php echo e(Str::limit($album->description, 50)); ?></td>
                                <td>
                                    <a href="<?php echo e(route('admin.edit_album', ['id' => $album->id])); ?>" class="btn btn-sm btn-primary me-1">
                                        <i class="bi bi-pencil-square"></i>
                                    </a>
                                    <button wire:click="deleteAlbum(<?php echo e($album->id); ?>)" class="btn btn-sm btn-danger">
                                        <i class="bi bi-trash"></i>
                                    </button>
                                </td>
                                <td>
                                    <a href="<?php echo e(route('admin.photos.list', ['album' => $album->id])); ?>">
                                        <i class="bi bi-images"></i> Photos
                                    </a>
                                </td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td colspan="6" class="text-center text-muted">No albums found.</td>
                            </tr>
                            <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                        </tbody>
                    </table>
                </div>

                <div class="mt-3">
                    <?php echo e($albums->links('livewire::simple-bootstrap')); ?>

                </div>
            </div>
        </div>
    </div>
</div>
<?php /**PATH C:\xampp\htdocs\larablog\resources\views/livewire/admin/albums.blade.php ENDPATH**/ ?>