@extends('auth.layout')

@section('content')
<div id="passwordEmail" class="container-fluid">
    <header>
        <a href="/" type="text/html" rel="noreferrer" referrerpolicy="no-referrer">
            {{ strtoupper(config('app.name')) }}
        </a>
    </header>
    <main>

        <h5>{{ __('Reset Password') }}</h5>

        @if (session('status'))
            <script>
                alert("{{ session('status') }}");
                setTimeout(function() {
                    location.replace('/login');
                }, 2000);
            </script>
        @endif

        <form name="f_password_email" id="fPasswordEmail" method="post" action="{{ route('password.email') }}" accept-charset="UTF-8">
            @csrf

            <div class="mb-3">
                <label for="email" class="form-label">{{ __('Email Address') }}</label>
                <input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus/>

                @error('email')
                <span class="invalid-feedback" role="alert">
                    <strong>{{ $message }}</strong>
                </span>
                @enderror
            </div>

            <div class="mb-3">
                <button type="submit" class="btn btn-success w-100">
                    {{ __('Send Password Reset Link') }}
                </button>
            </div>

            <div class="mb-3 text-center">
                @if (Route::has('login'))
                    <a href="{{ route('login') }}">≪ {{ __('Login') }}</a>
                @endif
            </div>
        </form>

        <hr/>

        <footer>
            Copyright (C) @ {{ date('Y') }} {{ config('company_name') }} Corp. All Rights Reserved.
        </footer>
    </main>
</div>
@endsection

@push('styles')
    <link rel="stylesheet" href="{{ asset('css/auth/passwords.css') }}"/>
@endpush

@push('scripts')
    <script src="{{ asset('/js/auth/passwords.js') }}" defer></script>
@endpush
