

<?php $__env->startSection('title', 'Manajemen Kategori | windyazhrtsyfa'); ?>

<?php $__env->startSection('content'); ?>
<div class="max-w-6xl mx-auto">

    
    <div class="mb-10 flex flex-col md:flex-row md:items-end justify-between gap-6">
        <div>
            <div class="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-pink-100 text-pink-600 text-[10px] font-black uppercase tracking-[0.2em] mb-4">
                <i data-lucide="layers" class="w-3 h-3"></i>
            
            </div>
            <h1 class="text-5xl font-black text-slate-900 tracking-tight">
                 <span class="text-transparent bg-clip-text bg-gradient-to-r from-pink-500 to-rose-600">Kategori</span>
            </h1>
            <p class="text-slate-500 mt-2 text-sm font-medium italic">
                Kelola klasifikasi dan pengelompokan produk wynn.
            </p>
        </div>

        <a href="<?php echo e(route('admin.categories.create')); ?>"
           class="group inline-flex items-center gap-3 px-8 py-4 bg-slate-900 text-white font-bold rounded-2xl hover:bg-pink-600 transition-all duration-300 shadow-xl hover:shadow-pink-200 hover:-translate-y-1">
            <i data-lucide="plus-circle" class="w-5 h-5"></i>
            Tambah Kategori
        </a>
    </div>

    
    <?php if(session('success')): ?>
        <div class="mb-8 flex items-center gap-3 p-4 bg-emerald-50 border border-emerald-100 text-emerald-700 rounded-2xl font-bold text-sm shadow-sm animate-in fade-in slide-in-from-top-4">
            <i data-lucide="check-circle" class="w-5 h-5"></i>
            <?php echo e(session('success')); ?>

        </div>
    <?php endif; ?>

    
    <div class="bg-white/80 backdrop-blur-md rounded-[40px] overflow-hidden shadow-2xl shadow-pink-100/50 border border-white">
        <table class="min-w-full">
            <thead>
                <tr class="bg-slate-50/50">
                    <th class="px-10 py-6 text-left text-[10px] font-black text-slate-400 uppercase tracking-widest">No</th>
                    <th class="px-10 py-6 text-left text-[10px] font-black text-slate-400 uppercase tracking-widest">Nama Kategori</th>
                    <th class="px-10 py-6 text-center text-[10px] font-black text-slate-400 uppercase tracking-widest">Aksi</th>
                </tr>
            </thead>
            <tbody class="divide-y divide-pink-50/50">
                <?php $__empty_1 = true; $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr class="group hover:bg-pink-50/30 transition-colors duration-300">
                    <td class="px-10 py-6">
                        <span class="text-slate-400 font-mono text-sm group-hover:text-pink-400 transition-colors">
                            <?php echo e(str_pad($loop->iteration, 2, '0', STR_PAD_LEFT)); ?>

                        </span>
                    </td>
                    <td class="px-10 py-6">
                        <span class="font-bold text-slate-700 text-lg group-hover:text-slate-900 transition-colors">
                            <?php echo e($cat->name); ?>

                        </span>
                    </td>
                    <td class="px-10 py-6">
                        <div class="flex justify-center gap-3">
                            <a href="<?php echo e(route('admin.categories.edit', $cat->id)); ?>"
                               class="p-3 bg-white text-slate-400 rounded-2xl shadow-sm border border-slate-100 hover:bg-pink-50 hover:text-pink-600 hover:border-pink-100 transition-all"
                               title="Edit Kategori">
                                <i data-lucide="edit-3" class="w-4 h-4"></i>
                            </a>

                            <form action="<?php echo e(route('admin.categories.destroy', $cat->id)); ?>" method="POST" class="inline">
                                <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                <button onclick="return confirm('Yakin hapus kategori ini?')"
                                        class="p-3 bg-white text-slate-400 rounded-2xl shadow-sm border border-slate-100 hover:bg-red-50 hover:text-red-500 hover:border-red-100 transition-all"
                                        title="Hapus Kategori">
                                    <i data-lucide="trash-2" class="w-4 h-4"></i>
                                </button>
                            </form>
                        </div>
                    </td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr>
                    <td colspan="3" class="px-8 py-24 text-center">
                        <div class="flex flex-col items-center">
                            <div class="w-20 h-20 bg-pink-50 text-pink-200 rounded-full flex items-center justify-center mb-4">
                                <i data-lucide="folder-open" class="w-10 h-10"></i>
                            </div>
                            <p class="text-slate-400 font-medium italic">Belum ada kategori yang terdaftar.</p>
                            <a href="<?php echo e(route('admin.categories.create')); ?>" class="mt-4 text-pink-500 font-bold text-sm hover:underline">Buat kategori pertama →</a>
                        </div>
                    </td>
                </tr>
                <?php endif; ?>
            </tbody>
        </table>

        
        <div class="bg-slate-50/50 px-10 py-4 border-t border-pink-50/50 flex justify-between items-center">
            <p class="text-[10px] font-black uppercase text-slate-400 tracking-tighter">
            </p>
            <p class="text-[10px] font-black uppercase text-pink-400 bg-pink-50 px-3 py-1 rounded-full">
                Total: <?php echo e($categories->count()); ?> Kategori
            </p>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\SwiftCart\resources\views/categories/index.blade.php ENDPATH**/ ?>