<?php $__env->startSection('title', 'Edit Pelanggan'); ?>
<?php $__env->startSection('active7', 'active'); ?>
<?php $__env->startSection('content'); ?>

    <div class="content-wrapper">
        <div class="container-xxl flex-grow-1 container-p-y">
            <!-- Invoice List Table -->
            <div class="card">
                <div class="header-menu d-flex justify-content-between align-items-center">
                    <h3 class="card-header">Edit Data Pelanggan</h3>
                    <form action="<?php echo e(route('pelanggan.update', $data->id)); ?>" method="POST" enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <button type="submit" class="btn btn-primary me-2" data-bs-toggle="modal"
                            data-bs-target="#staticBackdrop"><i class="bx bx-save bx-sm"></i> Simpan</button>
                </div>
                <div class="card-body">
                    <div class="row">
                        <!-- Kolom Kiri -->
                        <div class="col-md-6">
                            <!-- Laundry -->
                            <div class="mb-3">
                                <label for="laundry_id" class="form-label">Pilih Laundry</label>
                                <select id="laundry_id" name="laundry_id" class="form-select" required>
                                    <option value="<?php echo e($data->laundry_id); ?>"><?php echo e($data->laundry->nama_laundry); ?></option>
                                    <option value="">Pilih Laundry</option>
                                    <?php $__currentLoopData = $laundry; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $laundry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($laundry->id); ?>"><?php echo e($laundry->nama_laundry); ?>

                                        </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                            <!-- Username -->
                            <div class="mb-3">
                                <label for="username" class="form-label">Username</label>
                                <input type="text" class="form-control" id="username" name="username"
                                    placeholder="Masukkan Username" value="<?php echo e($data->user->username); ?>" required>
                            </div>

                            <!-- Email -->
                            <div class="mb-3">
                                <label for="email" class="form-label">Email</label>
                                <input type="email" class="form-control" id="email" name="email"
                                    placeholder="Masukkan Email" value="<?php echo e($data->user->email); ?>" required>
                            </div>

                            <!-- Password -->
                            <div class="mb-3">
                                <label for="password" class="form-label">Password</label>
                                <input type="password" class="form-control" id="password" name="password"
                                    placeholder="Masukkan Password">
                                <span class="text-danger">*Isi jika ingin perbarui password</span>
                            </div>

                            <!-- Phone -->
                            <div class="mb-3">
                                <label for="phone" class="form-label">No. Telp</label>
                                <input type="text" class="form-control" id="no_telp" name="no_telp"
                                    placeholder="Masukkan No. Telp" value="<?php echo e($data->user->no_telp); ?>" required>
                            </div>
                        </div>

                        <!-- Kolom Kanan -->
                        <div class="col-md-6">
                            <!-- Nama -->
                            <div class="mb-3">
                                <label for="nama" class="form-label">Nama</label>
                                <input type="text" class="form-control" id="nama" name="nama"
                                    placeholder="Masukkan Nama" value="<?php echo e($data->nama); ?>" required>
                            </div>

                            <!-- Alamat -->
                            <div class="mb-3">
                                <label for="alamat" class="form-label">Alamat</label>
                                <textarea class="form-control" id="alamat" name="alamat" placeholder="Masukkan Alamat" rows="3" required><?php echo e($data->alamat); ?></textarea>
                            </div>

                            <!-- Foto -->
                            <div class="mb-3">
                                <label for="foto" class="form-label">Foto</label>
                                <input type="file" class="form-control" id="foto" name="foto">
                                <span class="text-danger">*Isi jika ingin perbarui foto</span>
                            </div>

                            <div class="mb-3">
                                <img src="<?php echo e(asset('storage/img/' . $data->foto)); ?>"
                                    class="img-preview img-fluid mb-3 col-sm-5" alt="">
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('component.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp_2\htdocs\Laundry\resources\views/pelanggan/edit.blade.php ENDPATH**/ ?>