@extends('layouts.app')

@section('content')
    <div class="container-fluid p-4">
        <div class="card shadow-sm p-3">
            <h4 class="fw-bold" style="color: #063986;">Edit Data Pengguna</h4>
            <hr>

            <form action="{{ route('admin.updatecustomer', ['id' => $user->id]) }}" method="POST" enctype="multipart/form-data">
                @csrf
                @method('PUT')
 
                <!-- Nama Pengguna -->
                <div class="mb-3">
                    <label for="name" class="form-label">Nama</label>
                    <input type="text" name="name" id="name" class="form-control" value="{{ $user->name }}" required>
                </div>

                <!-- Email -->
                <div class="mb-3">
                    <label for="email" class="form-label">Email</label>
                    <input type="email" name="email" id="email" class="form-control" value="{{ $user->email }}" required>
                </div>

                <!-- Tombol Submit -->
                <div class="d-flex justify-content-between">
                    <a href="{{ route('admin.customer') }}" class="btn btn-secondary">Kembali</a>
                    <button type="submit" class="btn text-white" style="background: linear-gradient(135deg, #8AC0DF, #48499B); border: none;">
                        <i class="bi bi-save"></i> Simpan Perubahan
                    </button>
                </div>
            </form>
        </div>
    </div>
@endsection
