<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <h2 class="font-bold text-2xl text-gray-800 leading-tight">
            <?php echo e(__('Kelola Akun Keluarga')); ?>

        </h2>
     <?php $__env->endSlot(); ?>

    <div class="py-8">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 space-y-6">
            
            <!-- Success Notification -->
            <?php if(session('success')): ?>
                <div class="flex items-center gap-3 p-4 bg-emerald-50 border border-emerald-100 text-emerald-800 rounded-xl shadow-sm">
                    <i data-lucide="check-circle" class="w-5 h-5 text-emerald-600"></i>
                    <span class="text-sm font-semibold"><?php echo e(session('success')); ?></span>
                </div>
            <?php endif; ?>

            <!-- Table Card -->
            <div class="bg-white rounded-2xl shadow-sm border border-gray-150 p-6 space-y-6">
                <div>
                    <h3 class="text-lg font-bold text-gray-800">Daftar Anggota Keluarga</h3>
                    <p class="text-xs text-gray-400 font-medium">Lihat dan perbarui informasi password serta role akses (Suami/Admin dan Istri/User).</p>
                </div>

                <div class="overflow-x-auto">
                    <table class="min-w-full divide-y divide-gray-100 text-left text-sm">
                        <thead>
                            <tr class="text-gray-400 font-semibold uppercase tracking-wider text-xs bg-gray-50 rounded-lg">
                                <th class="py-3 px-6 rounded-l-lg">Nama Lengkap</th>
                                <th class="py-3 px-6">Alamat Email</th>
                                <th class="py-3 px-6">Role Akses</th>
                                <th class="py-3 px-6 text-right rounded-r-lg">Aksi</th>
                            </tr>
                        </thead>
                        <tbody class="divide-y divide-gray-100">
                            <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr class="hover:bg-gray-50 transition">
                                    <!-- Nama -->
                                    <td class="py-4 px-6 font-bold text-gray-800 flex items-center gap-3">
                                        <div class="p-2 bg-emerald-50 text-emerald-600 rounded-xl">
                                            <i data-lucide="user" class="w-5 h-5"></i>
                                        </div>
                                        <span><?php echo e($user->name); ?></span>
                                    </td>
                                    
                                    <!-- Email -->
                                    <td class="py-4 px-6 text-gray-500 font-medium">
                                        <?php echo e($user->email); ?>

                                    </td>

                                    <!-- Role -->
                                    <td class="py-4 px-6">
                                        <span class="px-2.5 py-1 text-xs font-semibold rounded-full <?php echo e($user->role === 'suami' ? 'bg-blue-50 text-blue-700' : 'bg-pink-50 text-pink-700'); ?>">
                                            <?php echo e($user->role === 'suami' ? 'Suami (Admin)' : 'Istri (User)'); ?>

                                        </span>
                                    </td>

                                    <!-- Aksi -->
                                    <td class="py-4 px-6 text-right">
                                        <a href="<?php echo e(route('users.edit', $user->id)); ?>" class="inline-flex items-center gap-1.5 px-3 py-1.5 bg-blue-50 hover:bg-blue-100 text-blue-600 text-xs font-bold rounded-xl transition" title="Edit Akun">
                                            <i data-lucide="edit-3" class="w-3.5 h-3.5"></i>
                                            Ubah Akun
                                        </a>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH D:\Software\laragon\www\report-outincome\resources\views\users\index.blade.php ENDPATH**/ ?>