@extends('layouts.app')

@section('content')
    <div class="container-xxl flex-grow-1 container-p-y">
        <div class="card">
            <div class="card-header">
                <div class="row align-items-center">
                    <div class="col-8">
                        <h5 class="card-title m-0">Change Your Password</h5>
                    </div>
                </div>
                <hr />
            </div>
            <div class="card-body">
                <form method="post" action="{{ route('change_password_update') }}" enctype="multipart/form-data">
                    @csrf
                    <input type="hidden" name="user_id" value="{{ auth()->id() }}">

                    <div class="form-group mb-3">
                        <div class="row g-3 align-items-center">
                            <div class="col-md-2 col-12">
                                <label class="form-label">Old Password</label>
                            </div>
                            <div class="col-md-4 col-12">
                                <input type="password" name="old_password" class="form-control" required>
                            </div>
                        </div>
                    </div>

                    <div class="form-group mb-3">
                        <div class="row g-3 align-items-center">
                            <div class="col-md-2 col-12">
                                <label class="form-label">New Password</label>
                            </div>
                            <div class="col-md-4 col-12">
                                <input type="password" name="new_password" class="form-control" required>
                            </div>
                        </div>
                    </div>

                    <div class="form-group mb-3">
                        <div class="row g-3 align-items-center">
                            <div class="col-md-2 col-12">
                                <label class="form-label">Confirm Password</label>
                            </div>
                            <div class="col-md-4 col-12">
                                <input type="password" name="new_password_confirmation" class="form-control" required>
                            </div>
                        </div>
                    </div>

                    <div class="">
                        <button type="submit" class="btn btn-primary">Update</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
@endsection
