<!DOCTYPE html>
<html class="loading" lang="en" data-textdirection="ltr">
<!-- BEGIN: Head-->

<head>
    <link rel="apple-touch-icon" href="{{ url('theme/images/ico/apple-icon-120.png') }}">
    <link rel="shortcut icon" type="image/x-icon" href="{{ url('theme/images/ico/favicon.ico') }}">
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;1,400;1,500;1,600" rel="stylesheet">

    <meta http-equiv="Content-Type" charset="utf-8">
    <meta name="universitas-negeri-surabaya" content="custom" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Golden Ticket UNESA">
    <meta name="author" content="PPTI Unesa Surabaya">
    <meta name="keywords" content="sistem, informasi, unesa, seleksi, penerimaan, mahasiswa, maba">
    <meta name="language" content="id">
    <meta name="geo.region" content="ID" />
    <meta name="geo.position" content="-7.300818;112.672689">
    <meta name="geo.placename" content="Surabaya">
    <meta name="geo.region" content="Indonesia">
    <title>Reset Password</title>

    <!-- BEGIN: Vendor CSS-->
    <link rel="stylesheet" type="text/css" href="{{ url('theme/vendors/css/vendors.min.css') }}">
    <!-- END: Vendor CSS-->

    <!-- BEGIN: Theme CSS-->
    <link rel="stylesheet" type="text/css" href="{{ url('theme/css/bootstrap.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url('theme/css/bootstrap-extended.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url('theme/css/colors.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url('theme/css/components.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url('theme/css/themes/dark-layout.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url('theme/css/themes/bordered-layout.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url('theme/css/themes/semi-dark-layout.css') }}">

    <!-- BEGIN: Page CSS-->
    <link rel="stylesheet" type="text/css" href="{{ url('theme/css/core/menu/menu-types/horizontal-menu.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url('theme/css/plugins/forms/form-validation.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url('theme/css/pages/authentication.css') }}">
    <!-- END: Page CSS-->

    <!-- BEGIN: Custom CSS-->
    <link rel="stylesheet" type="text/css" href="{{ url('theme/assets/css/style.css') }}">
    <!-- END: Custom CSS-->

</head>
<!-- END: Head-->

<!-- BEGIN: Body-->

<body class="horizontal-layout horizontal-menu blank-page navbar-floating footer-static  " data-open="hover" data-menu="horizontal-menu" data-col="blank-page">
    <!-- BEGIN: Content-->
    <div class="app-content content ">
        <div class="content-overlay"></div>
        <div class="header-navbar-shadow"></div>
        <div class="content-wrapper">
            <div class="content-header row">
            </div>
            <div class="content-body">
                <div class="auth-wrapper auth-basic px-2">
                    <div class="auth-inner my-2">
                        <!-- Login basic -->
                        <div class="card mb-0">
                            <div class="card-body">
                                <a href="index.html" class="brand-logo">
                                    {{-- <img src="{{ url('theme/images/logo/logoumc.png') }}" width="40%"> --}}
                                    <h2 class="brand-text text-primary ms-1">Reset Password</h2>
                                </a>
                                @if(session('error'))
                                    <div class="alert alert-danger">
                                        {{ session('error') }}
                                    </div>
                                @endif

                                @if(session('success'))
                                    <div class="alert alert-success">
                                        {{ session('success') }}
                                    </div>
                                @endif

                                {{-- CEK APAKAH USER SUDAH MEMASUKKAN EMAIL --}}
                                @if(!session()->has('reset_email'))
                                    {{-- FORM CEK EMAIL --}}
                                    <form class="text-left" method="POST" action="{{ route('cek-email') }}">
                                        @csrf
                                        @error('email')
                                            <div class="alert alert-danger">{{ $message }}</div>
                                        @enderror
                                        <div class="form-group">
                                            <label>Email</label>
                                            <input type="email" class="form-control" name="email" required placeholder="Masukkan Email">
                                        </div>
                                        <br>
                                        <button type="submit" class="btn btn-primary w-100">Cek Email</button>
                                    </form>
                                @else
                                    {{-- FORM RESET PASSWORD --}}
                                    <form class="text-left" method="POST" action="{{ route('submit-password') }}">
                                        @csrf
                                        <div class="form-group">
                                            <label>Nama</label>
                                            <input type="text" class="form-control" value="{{ session('reset_name') }}" readonly>
                                        </div>
                                        <br>

                                        <div class="form-group">
                                            <label>Email</label>
                                            <input type="email" class="form-control" value="{{ session('reset_email') }}" readonly>
                                        </div>
                                        <br>

                                        <div class="form-group">
                                            <label>Password</label>
                                            <input type="password" class="form-control @error('password') is-invalid @enderror" name="password" required placeholder="Masukkan Password">
                                            @error('password')
                                                <div class="alert alert-danger">{{ $message }}</div>
                                            @enderror
                                        </div>
                                        <br>

                                        <div class="form-group">
                                            <label>Konfirmasi Password</label>
                                            <input type="password" class="form-control @error('password_confirmation') is-invalid @enderror" name="password_confirmation" required placeholder="Ulangi Password">
                                            @error('password_confirmation')
                                                <div class="alert alert-danger">{{ $message }}</div>
                                            @enderror
                                        </div>
                                        <br>

                                        <button type="submit" class="btn btn-primary w-100">Reset Password</button>
                                    </form>
                                @endif
                            </br>

                            </div>
                        </div>
                        <!-- /Login basic -->
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!-- END: Content-->


    <!-- BEGIN: Vendor JS-->
    <script src="{{ url('theme/vendors/js/vendors.min.js') }}"></script>
    <!-- BEGIN Vendor JS-->

    <!-- BEGIN: Page Vendor JS-->
    <script src="{{ url('theme/vendors/js/ui/jquery.sticky.js') }}"></script>
    <script src="{{ url('theme/vendors/js/forms/validation/jquery.validate.min.js') }}"></script>
    <!-- END: Page Vendor JS-->

    <!-- BEGIN: Theme JS-->
    <script src="{{ url('theme/js/core/app-menu.js') }}"></script>
    <script src="{{ url('theme/js/core/app.js') }}"></script>
    <!-- END: Theme JS-->

    <!-- BEGIN: Page JS-->
    <script src="{{ url('theme/js/scripts/pages/auth-login.js') }}"></script>
    <!-- END: Page JS-->

    <script>
        $(window).on('load', function() {
            if (feather) {
                feather.replace({
                    width: 14,
                    height: 14
                });
            }
        })
    </script>
</body>
<!-- END: Body-->

</html>
