<?php $__env->startSection('content'); ?>
    <div class="container-fluid">
        <!-- Row -->
        <div class="row">
            <div class="col-xl-12 pa-0">
                <div class="profile-cover-wrap overlay-wrap">
                    <div class="profile-cover-img" style="background-image:url('/perpus/img-1.jpg')"></div>
                    <div class="bg-overlay bg-trans-dark-60"></div>
                    <div class="container-fluid px-xxl-65 px-xl-20 profile-cover-content py-50">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="media align-items-center">
                                    <div class="media-img-wrap  d-flex">
                                        <div class="avatar">
                                            <?php if(Auth::user()->foto == null): ?>
                                                <img src="/theme/dist/img/avatar12.jpg" alt="user"
                                                    class="avatar-img rounded-circle">
                                            <?php else: ?>
                                                <img src="/foto_petugas/<?php echo e(Auth::user()->foto); ?>" alt="user"
                                                    class="avatar-img rounded-circle">
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    <div class="media-body">
                                        <div class="text-white text-capitalize display-6 mb-5 font-weight-400">
                                            <?php echo e(Str::title(Auth::user()->name)); ?></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="bg-white shadow-bottom">
                    <div class="container-fluid px-xxl-65 px-xl-20">
                        <ul class="nav nav-light nav-tabs" role="tablist">
                            <li class="nav-item">
                                <a href="<?php echo e(route('profile.index')); ?>" class="d-flex h-60p align-items-center nav-link <?php echo e((request()->is('petugas/profile')) ? 'active' : ''); ?>">Data Akun</a>
                            </li>
                            <li class="nav-item">
                                <a href="<?php echo e(route('profile.foto')); ?>" class="d-flex h-60p align-items-center nav-link">Foto Profile</a>
                            </li>
                        </ul>
                    </div>
                </div>

                <?php if(session('success')): ?>
                    <div class="alert alert-success alert-wth-icon fade show" role="alert">
                        <span class="alert-icon-wrap"><i class="zmdi zmdi-check-circle"></i></span>
                        <?php echo e(session('success')); ?>

                    </div>
                <?php elseif(session('fail')): ?>
                    <div class="alert alert-danger alert-wth-icon fade show" role="alert">
                        <span class="alert-icon-wrap"><i class="zmdi zmdi-block"></i></span>
                        <?php echo e(session('fail')); ?>

                    </div>
                <?php endif; ?>

                <div class="tab-content mt-sm-20 mt-20">
                    <div class="tab-pane fade show active" role="tabpanel">
                        <div class="container-fluid px-xxl-65 px-xl-20">
                            <div class="row">
                                <div class="col-lg-8">
                                    <div class="card card-profile-feed">
                                        <div class="card-header card-header-action">
                                            <div class="media align-items-center">
                                                <div class="media-body">
                                                    <div class="text-capitalize font-weight-500 text-dark">Data Diri
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="card-body">
                                            <form action="<?php echo e(route('profile.profile', Auth::user()->id)); ?>" method="post" enctype="multipart/form-data">
                                                <?php echo csrf_field(); ?>
                                                <?php echo method_field('put'); ?>
                                                <div class="form-row">
                                                    <div class="col-md-12 mb-10">
                                                        <label for="validationCustom01">Nomor Induk Pegawai</label>
                                                        <input type="number" name="nip"
                                                            class="form-control <?php $__errorArgs = ['nip'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                            id="validationCustom01" placeholder="Nomor Induk Pegawai"
                                                            value="<?php echo e(Auth::user()->nip); ?>" autofocus>
                                                        <?php $__errorArgs = ['nip'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <span class="invalid-feedback"><?php echo e($message); ?></span>
                                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                    </div>
                                                </div>
                                                <div class="form-row">
                                                    <div class="col-md-6 mb-10">
                                                        <label for="validationCustom01">Nama Lengkap Petugas</label>
                                                        <input type="text" name="nama_petugas"
                                                            class="form-control <?php $__errorArgs = ['nama_petugas'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                            id="validationCustom01" placeholder="Nama Lengkap Siswa"
                                                            value="<?php echo e(Auth::user()->name); ?>">
                                                        <?php $__errorArgs = ['nama_petugas'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <span class="invalid-feedback"><?php echo e($message); ?></span>
                                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                    </div>
                                                    <div class="col-md-6 mb-10">
                                                        <label for="validationCustom01">No. Telp</label>
                                                        <input type="number" name="telp"
                                                            class="form-control <?php $__errorArgs = ['telp'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                            id="validationCustom01" placeholder="No Telp"
                                                            value="<?php echo e(Auth::user()->telp); ?>">
                                                        <?php $__errorArgs = ['telp'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <span class="invalid-feedback"><?php echo e($message); ?></span>
                                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                    </div>
                                                    <button class="btn btn-danger btn-wth-icon mt-10 w-100" type="submit">
                                                        <span class="btn-text">Perbaharui Data Profile</span>
                                                    </button>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-4">
                                    <div class="card card-profile-feed">
                                        <div class="card-header card-header-action">
                                            <div class="media align-items-center">
                                                <div class="media-body">
                                                    <div class="text-capitalize font-weight-500 text-dark">Ubah Password
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="card-body">
                                            <form action="<?php echo e(route('profile.password', Auth::user()->id)); ?>" method="post" enctype="multipart/form-data">
                                                <?php echo csrf_field(); ?>
                                                <?php echo method_field('put'); ?>
                                                <div class="form-row">
                                                    <div class="col-md-12 mb-10">
                                                        <label for="validationCustom01">Tulis Password</label>
                                                        <input type="password" name="password"
                                                            class="form-control <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                            placeholder="Tulis Password" id="myInput">
                                                        <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <span class="invalid-feedback"><?php echo e($message); ?></span>
                                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                    </div>
                                                </div>
                                                <div class="form-row">
                                                    <div class="col-md-12 mb-10">
                                                        <label for="validationCustom01">Tulis Ulang Password</label>
                                                        <input type="password" name="repassword"
                                                            class="form-control <?php $__errorArgs = ['repassword'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                            placeholder="Tulis Ulang Password" id="myInput2">
                                                        <?php $__errorArgs = ['repassword'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <span class="invalid-feedback"><?php echo e($message); ?></span>
                                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                                    </div>
                                                    <div class="custom-control custom-checkbox mb-25">
                                                        <input class="custom-control-input" id="same-address" type="checkbox" onclick="myFunction()">
                                                        <label class="custom-control-label font-14" for="same-address">Lihat Password</label>
                                                    </div>
                                                    <button class="btn btn-info btn-wth-icon mt-10 w-100" type="submit">
                                                        <span class="btn-text">Perbaharui Password Akun</span>
                                                    </button>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- /Row -->
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>
    <script>
         function myFunction() {
            var x = document.getElementById("myInput");
            var y = document.getElementById("myInput2");
            if (x.type === "password") {
                x.type = "text";
                y.type = "text";
            } else {
                x.type = "password";
                y.type = "password";
            }
        }

        window.setTimeout(function() {
            $(".alert").fadeTo(700, 0).slideUp(500, function() {
                $(this).remove();
            });
        }, 2500);

    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('petugas.theme.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\perpustakaan\resources\views/petugas/profile/profile.blade.php ENDPATH**/ ?>