<?php $__env->startSection('title', 'Potensi Desa'); ?>
<?php $__env->startSection('page-title', 'Potensi Desa'); ?>

<?php $__env->startSection('content'); ?>
<div class="flex items-center justify-between mb-6">
    <p class="text-gray-500 text-sm"><?php echo e($potentials->total()); ?> potensi terdaftar</p>
    <a href="<?php echo e(route('admin.potensi.create')); ?>" class="btn-primary">+ Tambah Potensi</a>
</div>

<div class="card-admin overflow-x-auto p-0">
    <table class="w-full">
        <thead class="bg-gray-50 border-b border-gray-200">
            <tr>
                <th class="table-header">Foto</th>
                <th class="table-header">Nama</th>
                <th class="table-header">Kategori</th>
                <th class="table-header">Lokasi</th>
                <th class="table-header">Aksi</th>
            </tr>
        </thead>
        <tbody class="divide-y divide-gray-100">
            <?php $__empty_1 = true; $__currentLoopData = $potentials; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pot): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <tr class="hover:bg-gray-50 transition-colors">
                <td class="table-cell">
                    <?php if($pot->foto_url): ?><img src="<?php echo e($pot->foto_url); ?>" class="w-14 h-10 rounded object-cover">
                    <?php else: ?><div class="w-14 h-10 bg-blue-50 rounded flex items-center justify-center text-xl">🌾</div><?php endif; ?>
                </td>
                <td class="table-cell font-medium"><?php echo e($pot->nama); ?></td>
                <td class="table-cell"><span class="badge badge-blue"><?php echo e($pot->kategori_label); ?></span></td>
                <td class="table-cell text-gray-400 text-xs"><?php echo e($pot->lokasi ?: '—'); ?></td>
                <td class="table-cell">
                    <div class="flex items-center gap-2">
                        <a href="<?php echo e(route('admin.potensi.edit', $pot->id)); ?>" class="text-secondary hover:text-primary text-sm font-medium">Edit</a>
                        <form method="POST" action="<?php echo e(route('admin.potensi.destroy', $pot->id)); ?>" data-confirm-delete>
                            <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                            <button class="text-red-500 hover:text-red-700 text-sm">Hapus</button>
                        </form>
                    </div>
                </td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <tr><td colspan="5" class="table-cell text-center text-gray-400 py-8">Belum ada data potensi.</td></tr>
            <?php endif; ?>
        </tbody>
    </table>
</div>
<div class="mt-4"><?php echo e($potentials->links()); ?></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH F:\web Desa Suka Baru\website-desa-suka-baru\resources\views/admin/potentials/index.blade.php ENDPATH**/ ?>