<!DOCTYPE html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>LPKA Kelas II Jakarta</title>

    <!-- Fonts & Styles -->
    <link rel="preconnect" href="https://fonts.bunny.net">
    <link href="https://fonts.bunny.net/css?family=instrument-sans:400,500,600" rel="stylesheet" />

    <!-- Favicon -->
    <link rel="icon" href="<?php echo e(asset('picture/favicon.ico')); ?>" type="image/x-icon">
    <link rel="shortcut icon" href="<?php echo e(asset('picture/favicon.ico')); ?>" type="image/x-icon">

    <?php echo app('Illuminate\Foundation\Vite')(['resources/css/app.css', 'resources/js/app.js']); ?>
</head>

<body class="bg-white text-slate-900 dark:bg-[#0a0a0a] dark:text-slate-100">
        
        <div class="w-full border-b border-slate-200/70 dark:border-white/10">
            <div class="mx-auto max-w-6xl px-4 py-3 flex items-center justify-between gap-3">
                <div class="flex items-center gap-2">
                    <div class="h-9 w-9 rounded-xl shadow-sm"
                        style="background: url('<?php echo e(asset('picture/logolpka1.png')); ?>') no-repeat center/cover;">
                    </div>
                    <div class="leading-tight">
                        <div class="text-base font-semibold tracking-tight">LPKA Kelas II Jakarta</div>
                        <div class="text-xs text-slate-500 dark:text-slate-400">Portal kegiatan di LPKA Kelas II Jakarta</div>
                    </div>
                    </div>

                    <div class="flex items-center gap-2">
                            <?php if(Route::has('login')): ?>
                            <?php if(auth()->guard()->check()): ?>

                            <a href="<?php echo e(route('anak_binaan.create')); ?>"
                            class="inline-flex items-center justify-center rounded-xl px-4 py-2 text-sm font-medium
                              bg-slate-900 text-white hover:bg-slate-800
                              dark:bg-white dark:text-slate-900 dark:hover:bg-slate-200 transition">
                            Tambah Anak Binaan
                            </a>

                            <?php else: ?>
                            <a href="<?php echo e(route('login')); ?>"
                            class="inline-flex items-center justify-center rounded-xl px-4 py-2 text-sm font-medium
                                    border border-slate-200 hover:border-slate-300 hover:bg-slate-50
                                    dark:border-white/10 dark:hover:bg-white/5 transition">
                                Log in
                            </a>

                            <?php if(Route::has('register')): ?>
                                <a href="<?php echo e(route('register')); ?>"
                                class="inline-flex items-center justify-center rounded-xl px-4 py-2 text-sm font-medium
                                        bg-slate-900 text-white hover:bg-slate-800
                                        dark:bg-white dark:text-slate-900 dark:hover:bg-slate-200 transition">
                                    Register
                                </a>
                            <?php endif; ?>
                            <?php endif; ?>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>

        
        <header class="relative overflow-hidden">
            <div class="absolute inset-0">
        <!-- Logo kiri atas -->
                <div class="absolute -top-24 -left-24 h-72 w-72 opacity-80"
                    style="background: url('<?php echo e(asset('picture/logolpka1.png')); ?>') no-repeat center/contain;">
                </div>

        <!-- Logo kanan bawah -->
                <div class="absolute -bottom-24 -right-24 h-72 w-72 opacity-80"
                    style="background: url('<?php echo e(asset('picture/logolpka1.png')); ?>') no-repeat center/contain;">
                </div>

        <!-- Overlay gradient tetap untuk transisi warna/gelap -->
                <div class="absolute inset-0 bg-gradient-to-b from-slate-50 to-white dark:from-white/5 dark:to-transparent"></div>
            </div>
            
            </div>
    </header>
         <!-- Konten utama -->
            <main class="max-w-5xl mx-auto py-10 px-4">
                <h2 class="text-2xl font-bold mb-6">Daftar Anak Binaan</h2>

                <table class="min-w-full border border-gray-300 bg-white shadow rounded">
        <thead class="bg-gray-100">
        <tr>
            <th class="border border-gray-300 px-4 py-2">No</th>
            <th class="border border-gray-300 px-4 py-2">Nama</th>
            <th class="border border-gray-300 px-4 py-2">Tanggal Lahir</th>
            <th class="border border-gray-300 px-4 py-2">Jenis Kelamin</th>
            <th class="border border-gray-300 px-4 py-2">Alamat</th>
            <th class="border border-gray-300 px-4 py-2">Aksi</th>
        </tr>
        </thead>

        <tbody class="divide-y divide-gray-300">
        <?php $__empty_1 = true; $__currentLoopData = $anakBinaan; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $anak): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <tr>
            <td class="border border-gray-300 px-4 py-2 text-center"><?php echo e($index + 1); ?></td>
            <td class="border border-gray-300 px-4 py-2"><?php echo e($anak->nama); ?></td>
            <td class="border border-gray-300 px-4 py-2"><?php echo e($anak->tanggal_lahir ?? '-'); ?></td>
            <td class="border border-gray-300 px-4 py-2"><?php echo e($anak->jenis_kelamin ?? '-'); ?></td>
            <td class="border border-gray-300 px-4 py-2"><?php echo e($anak->alamat ?? '-'); ?></td>
            <td class="border border-gray-300 px-4 py-2 flex gap-2">
                <!-- Tombol Edit -->
                <a href="<?php echo e(route('anak_binaan.edit', $anak->id)); ?>"
                class="bg-yellow-500 text-white px-2 py-1 rounded hover:bg-yellow-600">
                Edit
                </a>

                <!-- Form Hapus -->
                <form action="<?php echo e(route('anak_binaan.destroy', $anak->id)); ?>" method="POST"
                    onsubmit="return confirm('Yakin ingin menghapus data ini?');">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('DELETE'); ?>
                    <button type="submit" class="bg-red-500 text-white px-2 py-1 rounded hover:bg-red-600">
                        Hapus
                    </button>
                </form>
            </td>
        </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <tr>
            <td colspan="6" class="text-center px-4 py-4">Belum ada data anak binaan.</td>
        </tr>
        <?php endif; ?>
        </tbody>
</table>
    </main>

    <!-- Footer -->
        
        <footer class="border-t border-slate-200/70 dark:border-white/10">
            <div class="mx-auto max-w-6xl px-4 py-10">
                <div class="flex flex-col lg:flex-row justify-between gap-6">
                    <div>
                        <a href="<?php echo e(url('/')); ?>" class="flex items-center gap-2">
                <div class="h-9 w-9 rounded-xl shadow-sm"
                    style="background: url('<?php echo e(asset('picture/logolpka1.png')); ?>') no-repeat center/cover;">
                </div>
                        <div class="text-base font-semibold">LPKA Kelas II Jakarta</div>
                        </a>
                        <p class="mt-2 text-sm text-slate-600 dark:text-slate-300 max-w-md">
                            Portal berita kegiatan di LPKA Kelas II Jakarta.
                        </p>
                        <p class="mt-4 text-xs text-slate-500 dark:text-slate-400">
                            © <?php echo e(now()->year); ?> LPKA Kelas II Jakarta. All rights reserved.
                        </p>
                    </div>
        </footer>
</body>
</html><?php /**PATH /home/lpkaberk/public_html/resources/views/anak_binaan/index.blade.php ENDPATH**/ ?>