<x-app-layout>
    @section('page-title', $pageTitle)
    <div class="card shadow-sm border-0">
        <div class="card-header bg-white d-flex align-items-center">
            <a href="{{ route('admin.pengguna.index') }}" class="btn btn-light me-2"><i class="bi bi-arrow-left"></i></a>
            <h5 class="my-0 fw-bold">Formulir Edit Pengguna</h5>
        </div>
        <div class="card-body">
            <form action="#" method="POST">
                <div class="mb-3">
                    <label for="nama_lengkap" class="form-label">Nama Lengkap</label>
                    <input type="text" class="form-control" id="nama_lengkap" value="{{ $pengguna['nama_lengkap'] }}">
                </div>
                <div class="mb-3">
                    <label for="email" class="form-label">Email</label>
                    <input type="email" class="form-control" id="email" value="{{ $pengguna['email'] }}">
                </div>
                <div class="mb-3">
                    <label for="nisn" class="form-label">NISN (jika siswa)</label>
                    <input type="text" class="form-control" id="nisn" value="{{ $pengguna['nisn'] ?? '' }}">
                </div>
                <div class="mb-3">
                    <label for="role" class="form-label">Role</label>
                    <select class="form-select" id="role">
                        <option>Pilih role...</option>
                        <option value="siswa" @if($pengguna['role'] == 'siswa') selected @endif>Siswa</option>
                        <option value="penjaga perpus" @if($pengguna['role'] == 'penjaga perpus') selected @endif>Penjaga Perpus</option>
                    </select>
                </div>
                <div class="row">
                    <div class="col-md-6 mb-3">
                        <label for="password" class="form-label">Password Baru</label>
                        <input type="password" class="form-control" id="password" placeholder="Kosongkan jika tidak diubah">
                    </div>
                    <div class="col-md-6 mb-3">
                        <label for="password_confirmation" class="form-label">Konfirmasi Password</label>
                        <input type="password" class="form-control" id="password_confirmation">
                    </div>
                </div>
                <hr>
                <div class="d-flex justify-content-end">
                    <button type="submit" class="btn btn-primary">Simpan Perubahan</button>
                </div>
            </form>
        </div>
    </div>
</x-app-layout>