<div class="modal fade" id="create" 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">Tambah Admin</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>

            <form action="{{ route('admin.kelola-admin.store') }}" method="POST">
                @csrf
                <div class="modal-body">
                    <div class="row">
                        <div class="col-12">
                            <div class="row gx-2">
                                {{-- Nama Lengkap --}}
                                <div class="col-12 col-md-6">
                                    <div class="mb-2">
                                        <label class="form-label">Nama Lengkap</label>
                                        <input type="text" name="nama"
                                            class="form-control @error('nama') is-invalid @enderror"
                                            style="font-size: 14px;" placeholder="Masukkan Nama Lengkap"
                                            value="{{ old('nama') }}">
                                        @error('nama')
                                            <div class="invalid-feedback" style="font-size: 12px;">{{ $message }}</div>
                                        @enderror
                                    </div>
                                </div>

                                {{-- Username --}}
                                <div class="col-12 col-md-6">
                                    <div class="mb-2">
                                        <label class="form-label">Username</label>
                                        <input type="text" name="username"
                                            class="form-control @error('username') is-invalid @enderror"
                                            style="font-size: 14px;" placeholder="Masukkan Username"
                                            value="{{ old('username') }}">
                                        @error('username')
                                            <div class="invalid-feedback" style="font-size: 12px;">{{ $message }}</div>
                                        @enderror
                                    </div>
                                </div>
                            </div>

                            <div class="row gx-2">
                                {{-- Nomor WA --}}
                                <div class="col-12 col-md-4">
                                    <div class="mb-2">
                                        <label class="form-label">Nomor WA</label>
                                        <input type="number" name="no_wa"
                                            class="form-control @error('no_wa') is-invalid @enderror"
                                            style="font-size: 14px;" placeholder="Masukkan Nomor WA"
                                            value="{{ old('no_wa') }}">
                                        @error('no_wa')
                                            <div class="invalid-feedback" style="font-size: 12px;">{{ $message }}</div>
                                        @enderror
                                    </div>
                                </div>

                                {{-- Email --}}
                                <div class="col-12 col-md-4">
                                    <div class="mb-2">
                                        <label class="form-label">Email</label>
                                        <input type="email" name="email"
                                            class="form-control @error('email') is-invalid @enderror"
                                            style="font-size: 14px;" placeholder="Masukkan Email"
                                            value="{{ old('email') }}">
                                        @error('email')
                                            <div class="invalid-feedback" style="font-size: 12px;">{{ $message }}</div>
                                        @enderror
                                    </div>
                                </div>

                                {{-- Peran --}}
                                <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"
                                                name="role" style="font-size: 14px">
                                                <option value="" selected disabled>Pilih Peran</option>
                                                <option value="admin_foto"
                                                    {{ old('role') == 'admin_foto' ? 'selected' : '' }}>Admin Foto
                                                </option>
                                                <option value="admin_buket"
                                                    {{ old('role') == 'admin_buket' ? 'selected' : '' }}>Admin Buket
                                                </option>
                                            </select>
                                            @error('role')
                                                <div class="invalid-feedback d-block" style="font-size: 14px;">
                                                    {{ $message }}</div>
                                            @enderror
                                        </fieldset>
                                    </div>
                                </div>
                            </div>

                            {{-- Alamat --}}
                            <div class="mb-2">
                                <label class="form-label">Alamat</label>
                                <input type="text" name="alamat"
                                    class="form-control @error('alamat') is-invalid @enderror" style="font-size: 14px;"
                                    placeholder="Masukkan Alamat Lengkap" value="{{ old('alamat') }}">
                                @error('alamat')
                                    <div class="invalid-feedback" style="font-size: 12px;">{{ $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 px-3 py-2">
                        Simpan
                    </button>
                </div>
            </form>

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