<div class="modal fade" id="edit{{ $a->id_user }}" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg">
        <div class="modal-content">

            <div class="modal-header">
                <h5 class="modal-title">Edit Admin {{ $a->nama }}</h5> <button type="button" class="btn-close"
                    data-bs-dismiss="modal" aria-label="Close"></button>
            </div>

            <form action="{{ route('admin.kelola-admin.update', $a->id_user) }}" method="POST">
                @csrf
                @method('PUT')
                <div class="modal-body">
                    <div class="row gx-3">

                        <div class="col-12">
                            <div class="row gx-1">
                                <div class="col-12 col-md-6">
                                    <div class="mb-2">
                                        <label class="form-label">Nama Lengkap</label>
                                        <input type="text" name="nama"
                                            style="font-size: 14px;"class="form-control @error('nama') is-invalid @enderror"
                                            value="{{ old('nama', $a->nama) }}">
                                        @error('nama')
                                            <div class="invalid-feedback">{{ $message }}</div>
                                        @enderror
                                    </div>
                                </div>

                                <div class="col-12 col-md-6">
                                    <div class="mb-2">
                                        <label class="form-label">Username</label>
                                        <input type="text" name="username"
                                            style="font-size: 14px;"class="form-control @error('username') is-invalid @enderror"
                                            value="{{ old('username', $a->username) }}">
                                        @error('username')
                                            <div class="invalid-feedback">{{ $message }}</div>
                                        @enderror
                                    </div>
                                </div>
                            </div>
                            <div class="row gx-1">
                                <div class="col-12 col-md-4">
                                    <div class="mb-2">
                                        <label class="form-label">Nomor WA</label>
                                        <input type="text" name="no_wa"
                                            style="font-size: 14px;"class="form-control @error('no_wa') is-invalid @enderror"
                                            value="{{ old('no_wa', $a->no_wa) }}">
                                        @error('no_wa')
                                            <div class="invalid-feedback">{{ $message }}</div>
                                        @enderror
                                    </div>
                                </div>
                                <div class="col-12 col-md-4">
                                    <div class="mb-2">
                                        <label class="form-label">Email</label>
                                        <input type="text" name="email"
                                            style="font-size: 14px;"class="form-control @error('email') is-invalid @enderror"
                                            value="{{ old('email', $a->email) }}">
                                        @error('email')
                                            <div class="invalid-feedback">{{ $message }}</div>
                                        @enderror
                                    </div>
                                </div>

                                <div class="col-12 col-md-4">
                                    <div class="mb-2">
                                        <label class="form-label">Peran</label>

                                        <fieldset class="form-group">
                                            <select class="form-select @error('role') is-invalid @enderror"
                                                id="basicSelect" style="font-size: 13px" name="role">
                                                <option value="admin_foto"
                                                    {{ old('role', $a->role) == 'admin_foto' ? 'selected' : '' }}>
                                                    Admin Foto
                                                </option>
                                                <option value="admin_buket"
                                                    {{ old('role', $a->role) == 'admin_buket' ? 'selected' : '' }}>
                                                    Admin Buket
                                                </option>
                                            </select>

                                            {{-- Pesan Error Khusus Select --}}
                                            @error('role')
                                                <div class="invalid-feedback d-block">{{ $message }}</div>
                                            @enderror
                                        </fieldset>
                                    </div>
                                </div>
                            </div>
                            <div class="mb-2">
                                <label class="form-label">Alamat</label>
                                <input type="text" name="alamat"
                                    style="font-size: 14px;"class="form-control @error('alamat') is-invalid @enderror"
                                    value="{{ old('alamat', $a->alamat) }}">
                                @error('alamat')
                                    <div class="invalid-feedback">{{ $message }}</div>
                                @enderror
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer justify-content-end border-top-0 pt-0">
                    <button type="submit" class="btn btn-primary rounded-pill terima px-3 py-2">
                        Simpan
                    </button>
                </div>
            </form>

        </div>
    </div>
</div>
