<?php $__env->startSection('title', 'Brand'); ?>
<?php $__env->startSection('active10', 'active'); ?>
<?php $__env->startSection('content'); ?>
    <div class="content-wrapper">
        <div class="container-xxl flex-grow-1 container-p-y">
            <div class="card">
                <div class="header-menu d-flex justify-content-between align-items-center">
                    <h4 class="card-header">Edit Data Brand</h4>
                    <form action="<?php echo e(route('laundry.update', $data->id)); ?>" method="POST" enctype="multipart/form-data">
                        <button type="sumbit" 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">
                    <?php echo csrf_field(); ?>
                    <div class="row">
                        <!-- Kolom Kiri -->
                        <div class="col-md-12">
                            <!-- Brand ID -->
                            <?php if(Auth::user()->role == 'superadmin'): ?>

                                <div class="mb-3">
                                    <label for="brand_id" class="form-label">Brand ID</label>
                                    <select name="brand_id" id="pelanggan" class="form-select">
                                        <option value="<?php echo e($data->brand_id); ?>"> <?php echo e($data->brand_id); ?> -
                                            <?php echo e($data->brand->nama_brand); ?></option>
                                        <option value="">--Pilih Brand--</option>
                                        <?php $__currentLoopData = $brand; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $brand): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($brand->id); ?>"><?php echo e($brand->id); ?>

                                                -<?php echo e($brand->nama_brand); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                            <?php else: ?>
                                <div class="mb-3">
                                    <label for="brand_id" class="form-label">Brand ID</label>
                                    <input type="text" class="form-control"
                                        value="<?php echo e($brand->id); ?> - <?php echo e($brand->nama_brand); ?>" readonly>
                                    <input type="text" class="form-control" id="brand_id" name="brand_id"
                                        placeholder="Masukkan Brand ID" value="<?php echo e($brand->id); ?>" hidden>
                                </div>
                            <?php endif; ?>


                            <!-- Nama Laundry -->
                            <div class="mb-3">
                                <label for="nama_laundry" class="form-label">Nama Laundry</label>
                                <input type="text" class="form-control" id="nama_laundry" name="nama_laundry"
                                    placeholder="Masukkan Nama Laundry" value="<?php echo e($data->nama_laundry); ?>" 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>

                            <!-- No Telp -->
                            <div class="mb-3">
                                <label for="no_telp" 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->no_telp); ?>" required>
                            </div>
                            <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->email); ?>" required>
                            </div>

                            <!-- Status -->
                            <?php if(Auth::user()->role == 'superadmin'): ?>
                                <div class="mb-3">
                                    <label for="status" class="form-label">Status</label>
                                    <select class="form-select" id="status" name="status" required>
                                        <option value="<?php echo e($data->status); ?>"><?php echo e($data->status); ?></option>
                                        <option value="">--Pilih Status--</option>
                                        <option value="trial">Trial</option>
                                        <option value="pro">Pro</option>
                                    </select>
                                </div>
                            <?php else: ?>
                                <input type="hidden" name="status" value="trial">
                            <?php endif; ?>

                        </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/laundry/edit.blade.php ENDPATH**/ ?>