@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('reset.password.post') }}">
                @csrf
                <input type="hidden" name="token" value="{{ $token }}">
                <input type="hidden" name="username" value="{{ $username }}">
                <div class="form-group">
                    <input id="user" type="text" class="form-control" value="{{ $username }}" disabled>
                </div>
                <div class="form-group">
                    <input id="password" type="password" class="form-control w-100 " name="password" placeholder="รหัสผ่านใหม่" >

                </div>
                <div class="form-group">
                    <input id="password_confirmation" type="password" class="form-control w-100" name="password_confirmation" placeholder="ยืนยันรหัสผ่านใหม่" >

                </div>
                @error('password')
                        <div class="text-danger">{{  $message }}</div>
                @enderror
                @error('confirmPassword')
                        <div class="text-danger">{{  $message }}</div>
                    @enderror
                <button type="submit" class="btn btn-primary mt-3">เปลี่ยนรหัสผ่าน</button>
            </form>
        </div>
    </div>




</div>
@endsection
