@extends('layouts.user')

@section('content')

<div class="app-container">
    <header>
        
        <div class="logo">Change Password</div>
    </header>

    <section class="edit-profile-section">
        <div class="profile-avatar-edit">
             @if ($user->profile_pic)
        <img src="{{ asset('storage/app/public/' . $user->profile_pic) }}" alt="{{ $user->name }}" id="profile-preview" class="imaged w100 rounded">
    @else
        <img src="{{ asset('storage/user_default.png') }}" id="profile-preview" alt="{{ $user->name }}" class="imaged w100 rounded">
    @endif
             
        </div>

        <form class="edit-profile-form" action="{{ route('change_password') }}" method="POST" >
                            @csrf
            
                             
            <div class="input-group">
                <label>Old Password</label>
                <input type="password" name="old_password"  placeholder="Old Password" required>
            </div>
            <div class="input-group">
                <label>New Password</label>
                <input type="password" name="new_password" placeholder="New Password"  required>
            </div>
            <div class="input-group">
                <label>Confirm New Password</label>
                <input type="password" name="new_password_confirmation"   placeholder="Confirm Password" required>
            </div>
             
            
             

            <button type="submit" class="btn-save-profile">Save Changes</button>
        </form>
    </section>


 
@endsection