@extends('layouts.app')

@section('content')
<div class="main">
    <div class="container d-flex justify-content-center align-items-center vh-100">
        <div class="bg-white text-center p-5 mt-3 center w-50">
            <h4>ลืมรหัสผ่าน</h4>
            @if (session('status'))
            <div class="alert alert-success" role="alert">
                <p>{{ session('status') }}</p>
            </div>
            @endif
            <form class="pb-3 mt-4" method="POST" action="{{ route('password.update') }}">
                @csrf
                <input type="hidden" name="token" value="{{ $token }}">
                <div class="form-group">
                    <input id="email" type="email" class="form-control" name="email" value="{{ $email ?? old('email') }}" placeholder="ชื่อผู้ใช้" disabled>
                </div>
                <div class="form-group">
                    <input id="password" type="password" class="form-control w-100 @error('password') is-invalid @enderror" name="password" placeholder="รหัสผ่านใหม่" required autocomplete="new-password">
                    @error('password')
                    <span class="invalid-feedback" role="alert">
                        <strong>{{ $message }}</strong>
                    </span>
                    @enderror
                </div>
                <div class="form-group">
                    <input id="password-confirm" type="password" class="form-control w-100" name="password_confirmation" placeholder="ยืนยันรหัสผ่านใหม่" required autocomplete="new-password">
                </div>
                <button type="submit" class="btn btn-primary mt-3">ส่งคำขอเปลี่ยนรหัสผ่าน</button>
            </form>
        </div>
    </div>




</div>
@endsection
