 
 <?php $__env->startSection('content'); ?>
 <div class="container">
     <div class="justify-content-center">
         <div class="">
             <div class="card">
                 <div class="card-header">Update Broad Caste Appdetail</div>
                 <div class="card-body">
                     <?php if($errors->any()): ?>
                     <div class="alert alert-danger">
                         <ul>
                             <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                             <li><?php echo e($error); ?></li>
                             <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                         </ul>
                     </div>
                     <?php endif; ?>
                     <form role="form" method="post" onsubmit="return validateForm('addsstatus')" class="addsstatus" action="<?php echo e(url('admin/appdetail')); ?>" autocomplete="off" enctype="multipart/form-data">
                         <?php echo csrf_field(); ?>
                         <div class="row">
                             <div class="col-sm-6">
                                 <label for="title">UPI ID</label>
                                 <input type="text" class="form-control input-mandatory"
                                     name="descripation" id="descripation" value="<?php echo e($detail->message); ?>" placeholder="">
                             </div>
                             <div class="col-sm-2">
                                 <label for="title">UPI Status</label>
                                 <a href="<?php echo e(url('/admin/appdetail/p-changestatus/'.$detail->id)); ?>" class="btn btn-xs btn-<?php echo e(($detail->phone_pay_status == '1') ? 'success' : 'danger'); ?> button_flow form-control" data-toggle="tooltip" data-placement="top" title=""> <i class="fa <?php echo e(($detail->phone_pay_status == '1') ? 'fa-toggle-on' : 'fa-toggle-off'); ?>"></i></a>
                             </div>

                             <div class="col-sm-6">
                                 <div class="col-sm-12">
                                     <label for="title">QR Image</label>
                                     <input type="file" class="form-control"
                                         name="upi_image" id="upi_image" value="" onchange="previewImage()">


                                     <label>Image Preview</label>
                                     <img id="imagePreview" src="<?php echo e($detail->upi_image ?  url($detail->upi_image) : ''); ?>" alt="Preview" style="width: 10%;display: <?php echo e($detail->upi_image ? 'block':'none'); ?>;" />
                                 </div>

                                 <div class="col-sm-12 mt-2">
                                     <label for="removeImage">Remove Image</label>
                                     <input type="checkbox" name="remove_image" id="removeImage" value="1" onclick="toggleImageRemoval()">
                                     <span>Check this box and save if you want to remove the image.</span>
                                 </div>
                             </div>
                             <div class="col-sm-2">
                                 <label for="title">QR Status</label>
                                 <a href="<?php echo e(url('/admin/appdetail/g-changestatus/'.$detail->id)); ?>" class="btn btn-xs btn-<?php echo e(($detail->g_pay_status == '1') ? 'success' : 'danger'); ?> button_flow form-control" data-toggle="tooltip" data-placement="top" title=""> <i class="fa <?php echo e(($detail->g_pay_status == '1') ? 'fa-toggle-on' : 'fa-toggle-off'); ?>"></i></a>
                             </div>
                         </div>

                         <div class="row">
                             <div c class="col-sm-12">
                                 <label for="title">Mobile</label>
                                 <input type="text" class="form-control input-mandatory"
                                     name="mobile" id="mobile" value="<?php echo e($detail->mobile); ?>" placeholder="">
                             </div>
                         </div>
                         <div class="row">
                             <div c class="col-sm-12">
                                 <label for="title">Telegram Link</label>
                                 <input type="text" class="form-control input-mandatory"
                                     name="telegram" id="telegram" value="<?php echo e($detail->telegram); ?>" placeholder="">
                             </div>
                         </div>
                         <div class="row">
                             <div c class="col-sm-12">
                                 <label for="title">App Version <sub class="text text-danger">(This App Version is for force update app.)</sub></label>
                                 <input type="text" class="form-control"
                                     name="app_version" id="app_version" value="<?php echo e($detail->app_version); ?>" placeholder="Enter Current App Version">
                             </div>
                         </div>

                         <div class="row">
                             <div c class="col-sm-12">
                                 <label for="title">APK Link <sub class="text text-danger"></sub></label>
                                 <input type="text" class="form-control"
                                     name="apk_link" id="apk_link" value="<?php echo e($detail->apk_link); ?>" placeholder="Enter APK Link">
                             </div>
                         </div>
                         <div class="row">
                             <div c class="col-sm-12">
                                 <label for="title">Notice</label>
                                 <textarea type="text" class="form-control " name="notice" id="notice" value="<?php echo e($detail->notice); ?>" placeholder=""><?php echo e($detail->notice); ?></textarea>
                             </div>
                         </div>
                         <div class="row mt-5">
                             <div c class="col-sm-12">
                                 <label for="title">Admin Percent<b> (Distributing Percent : <span id="distribute"><?php echo e(100 - $detail->admin_percent); ?></span>)</b></label>
                                 <input type="number" class="form-control input-mandatory"
                                     name="admin_percent" id="admin_percent"
                                     value="<?php echo e($detail->admin_percent); ?>" placeholder=""
                                     min="0.01" max="99.99" step="0.01"
                                     oninput="validateAdminPercent()" required>
                             </div>
                         </div>
                         
                         
                         <div class="row">
                             <div c class="col-sm-12">
                                 <label for="title">Minimum Withdraw Amount </label>
                                 <input type="text" class="form-control"
                                     name="minimum_withdraw" id="minimum_withdraw" value="<?php echo e($detail->minimum_withdraw); ?>" placeholder="Enter Minimum Withdraw Amount">
                             </div>
                         </div>
                         
                         
                         <div class="row">
                             <div c class="col-sm-12">
                                 <label for="title">Minimum Deposit Amount </label>
                                 <input type="text" class="form-control"
                                     name="min_despoite" id="min_despoite" value="<?php echo e($detail->min_despoite); ?>" placeholder="Enter Minimum Deposit Amount">
                             </div>
                         </div>
                         
                         
                         <div class="row">
                             <div c class="col-sm-12">
                                 <label for="title">Minimum Bet Amount </label>
                                 <input type="text" class="form-control"
                                     name="min_bet_amount" id="min_bet_amount" value="<?php echo e($detail->min_bet_amount); ?>" placeholder="Enter Minimum Bet Amount">
                             </div>
                         </div>
                         
                         
                         <div class="row">
                             <div c class="col-sm-12">
                                 <label for="title">Maximum Bet Amount </label>
                                 <input type="text" class="form-control"
                                     name="max_bet_amount" id="max_bet_amount" value="<?php echo e($detail->max_bet_amount); ?>" placeholder="Enter Maximum Bet Amount">
                             </div>
                         </div>
                         
                         <div class="row mt-3">
                            <div class="col-sm-6">
                                <div class="form-check">
                                    <input class="form-check-input" 
                                           type="checkbox" 
                                           id="starline_status" 
                                           name="starline_status"
                                           value="1" 
                                           <?php echo e($detail->starline_status ? 'checked' : ''); ?>>
                                    <label class="form-check-label" for="starline_status">
                                        Starline Status
                                    </label>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-check">
                                    <input class="form-check-input" 
                                           type="checkbox" 
                                           id="jackpot_status" 
                                           name="jackpot_status"
                                           value="1" 
                                           <?php echo e($detail->jackpot_status ? 'checked' : ''); ?>>
                                    <label class="form-check-label" for="jackpot_status">
                                        Jackpot Status
                                    </label>
                                </div>
                            </div>
                        </div>
                         <!--<div class="row mt-5">-->
                         <!--    <div c class="col-sm-12">-->
                         <!--        <label for="title">Admin Roullete Percent<b> (Distributing Percent : <span id="distribute"><?php echo e(100 - $detail->admin_Roullete_percent); ?></span>)</b></label>-->
                         <!--        <input type="number" class="form-control input-mandatory"-->
                         <!--            name="admin_Roullete_percent" id="admin_Roullete_percent"-->
                         <!--            value="<?php echo e($detail->admin_Roullete_percent); ?>" placeholder=""-->
                         <!--            min="0.01" max="99.99" step="0.01"-->
                         <!--            oninput="validateAdminPercent()" required>-->
                         <!--    </div>-->
                         <!--</div>-->

                         <br>
                         <div class="form-group">

                             <button type="submit" class="btn btn-primary">Submit</button>
                         </div>

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

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

 <?php $__env->startSection('js-content'); ?>
 <script>
     function validateAdminPercent() {
         let adminPercent = document.getElementById("admin_percent").value;
         if (adminPercent <= 0 || adminPercent >= 100) {
             // Display an error message or make the input invalid
             document.getElementById("admin_percent").setCustomValidity("Please enter a number between 0 and 100, but not 0 or 100.");
         } else {
             document.getElementById("admin_percent").setCustomValidity("");
         }
         document.getElementById("distribute").innerHTML = 100 - adminPercent;
     }
 </script>
 <script>
     function previewImage() {
         const file = document.getElementById('upi_image').files[0];
         const previewContainer = document.getElementById('imagePreview');
         const imagePreview = document.getElementById('imagePreview');

         if (file) {
             const reader = new FileReader();

             reader.onload = function(e) {
                 imagePreview.src = e.target.result;
                 previewContainer.style.display = 'block'; // Show preview container
             };

             reader.readAsDataURL(file);
         } else {
             previewContainer.style.display = 'none'; // Hide preview container if no file is selected
         }
     }
 </script>

 <?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.main-layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/profcymadev/public_html/onexgame.profcymadev.in/resources/views/admin/appdetail/create.blade.php ENDPATH**/ ?>