<?php $__env->startSection('panel'); ?>
<div class="row">
    <?php if(Route::is('admin.website.provider.edit')): ?>
    <div class="col-lg-4 mb-3">
        <div class="card">
            <div class="card-body">
                <h4 class="card-title">Input Banner</h4>
                <form class="form p-t-20" enctype="multipart/form-data" action="<?php echo e(route('admin.website.provider.update',$providers->id)); ?>"
                    method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="form-group">
                        <label>Icon (Opsional Jika Ingin Mengubahnya)</label>
                        <img class="input-group mb-3" style="width: 100px" src="<?php echo e(asset('uploads/'.$providers->icon)); ?>">
                        <div class="input-group mb-3">
                            <input type="file" value="<?php echo e($providers->icon); ?>" class="form-control" name="icon">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Banner Desktop</label>
                        <img class="input-group mb-3" style="width: 100px" src="<?php echo e(asset('uploads/'.$providers->banner_desktop)); ?>">
                        <div class="input-group mb-3">
                            <input type="file" value="<?php echo e($providers->banner_desktop); ?>" class="form-control" name="banner_desktop" placeholder="Optional">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Banner Mobile</label>
                        <img class="input-group mb-3" style="width: 100px" src="<?php echo e(asset('uploads/'.$providers->banner_mobile)); ?>">
                        <div class="input-group mb-3">
                            <input type="file" value="<?php echo e($providers->banner_mobile); ?>" class="form-control" name="banner_mobile" placeholder="Optional">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Nama</label>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" name="provider" required="" value="<?php echo e($providers->provider_name); ?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Slug</label>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" name="slug" required="" value="<?php echo e($providers->slug); ?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Code</label>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" name="provider_code" required="" value="<?php echo e($providers->provider_code); ?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Type</label>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" name="type" required=""value="<?php echo e($providers->game_type); ?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Whitelabel</label>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" name="product_code" required="" value="<?php echo e($providers->product_code); ?>">
                        </div>
                    </div>
                    <div class="form-group mb-2">
                        <label class="form-label">Status :</label>
                        <select name="status" class="form-control" required>
                            <option value="1" <?php echo e($providers->status == '1'  ? 'selected' : ''); ?>>Active</option>
                            <option value="0" <?php echo e($providers->status == '0'  ? 'selected' : ''); ?>>Not Actived</option>
                        </select>
                    </div>
                    <button type="submit" class="btn btn-primary m-r-10" name="upload">Submit</button>
                </form>
            </div>
        </div>
    </div>
    <?php else: ?>
    <div class="col-lg-4 mb-3">
        <div class="card">
            <div class="card-body">
                <h4 class="card-title">Input Banner</h4>
                <form class="form p-t-20" enctype="multipart/form-data" action="<?php echo e(route('admin.website.provider.create')); ?>"
                    method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="form-group">
                        <label>Icon</label>
                        <div class="input-group mb-3">
                            <input type="file" class="form-control" name="icon" placeholder="Optional">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Banner Desktop</label>
                        <div class="input-group mb-3">
                            <input type="file" class="form-control" name="banner_desktop" placeholder="Optional">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Banner Mobile</label>
                        <div class="input-group mb-3">
                            <input type="file" class="form-control" name="banner_mobile" placeholder="Optional">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Nama</label>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" name="provider" required="" placeholder="Masukkan text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Slug</label>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" name="slug" required="" placeholder="Masukkan text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Code</label>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" name="provider_code" required="" placeholder="Masukkan text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Type</label>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" name="type" required="" placeholder="Masukkan text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label>Whitelabel</label>
                        <div class="input-group mb-3">
                            <input type="text" class="form-control" name="type" required="">
                        </div>
                    </div>
                    <div class="form-group mb-2">
                        <label class="form-label">Status :</label>
                        <select name="status" class="form-control" required>
                            <option value="1">Active</option>
                            <option value="0">Not Actived</option>
                        </select>
                    </div>
                    <button type="submit" class="btn btn-primary m-r-10" name="upload">Submit</button>
                </form>
            </div>
        </div>
    </div>
    <?php endif; ?>
    <div class="col-lg-8 mb-3">
        <div class="card">
            <div class="card-datatable table-responsive">
                <table id="default-datatable" class="table table-bordered table-sm">
                    <thead>
                        <tr>
                            <th class="text-center" style="vertical-align: middle;">#</th>
                            <th class="text-center" style="vertical-align: middle;">Whitelabel</th>
                            <th class="text-center" style="vertical-align: middle;">Icon</th>
                            <th class="text-center" style="vertical-align: middle;">Nama</th>
                            <th class="text-center" style="vertical-align: middle;">Slug</th>
                            <th class="text-center" style="vertical-align: middle;">Code</th>
                            <th class="text-center" style="vertical-align: middle;">Type</th>
                            <th class="text-center" style="vertical-align: middle;">Status</th>
                            <th class="text-center" style="vertical-align: middle;">Aksi</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $provider; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <th class="text-center" style="vertical-align: middle; font-size: 13px;">
                                <?php echo e($loop->iteration); ?>

                            </th>
                            <td class="text-center"
                                style="vertical-align: middle; white-space: normal; font-size: 13px;">
                                <?php echo e($item->product_code); ?>

                            </td>
                            <td class="text-center" style="vertical-align: middle; white-space: normal; font-size: 13px;">
                                <img class="container-fluid" style="width: 100px;" src="<?php echo e(asset('uploads/'.$item->icon)); ?>">
                            </td>
                            <td class="text-center"
                                style="vertical-align: middle; white-space: normal; font-size: 13px;">
                                <?php echo e($item->provider_name); ?>

                            </td>
                            <td class="text-center"
                                style="vertical-align: middle; white-space: normal; font-size: 13px;">
                                <?php echo e($item->slug); ?>

                            </td>
                            <td class="text-center"
                                style="vertical-align: middle; white-space: normal; font-size: 13px;">
                                <?php echo e($item->provider_code); ?>

                            </td>
                            <td class="text-center"
                                style="vertical-align: middle; white-space: normal; font-size: 13px;">
                                <?php echo e($item->game_type); ?>

                            </td>
                            <td class="text-center"
                                style="vertical-align: middle; white-space: normal; font-size: 13px;">
                                <?php if($item->status == 1): ?>
                                Aktif
                                <?php else: ?>
                                Tidak Aktif
                                <?php endif; ?>
                            </td>
                            <td class="text-center" style="vertical-align: middle; font-size: 13px;">
                                <a href="<?php echo e(route('admin.website.provider.edit',$item->id)); ?>" class="btn btn-xs btn-primary"><span
                                    class="mdi mdi-pencil"></span></a>
                                <a href="<?php echo e(route('admin.website.provider.delete',$item->id)); ?>" class="btn btn-xs btn-danger"
                                    onclick="return confirm('Are you sure want to delete this floating?');"><span
                                        class="mdi mdi-trash-can"></span></a>
                            </td>
                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/website/sewa/cuby303/resources/views/backend/provider/index.blade.php ENDPATH**/ ?>