
<?php $__env->startSection('css'); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="main-panel">
    <div class="content-wrapper">
        <div class="page-header">
            <h3 class="page-title">
                <span class="page-title-icon bg-gradient-primary text-white me-2">
                    <i class="mdi mdi-home"></i>
                </span> Amount setup Rule
            </h3>
        </div>

        <div class="row">
            <div class="col grid-margin stretch-card">
                <div class="card">
                    <div class="card-body">
                        <h4 class="card-title">Plan Crashed Time Set</h4>

                        <form id="crashRuleUpdateForm">
                            <?php echo csrf_field(); ?>
                            <input type="hidden" name="id" value="14">
                            <input type="hidden" name="settingname" value="game_between_time_end">

                            <table class="table table-bordered table-primary">
                                <thead>
                                    <tr>
                                        <th>Sr.No</th>
                                        <th>Setting name</th>
                                        <th>Value</th>
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>1</td>
                                        <td>game_between_time_end</td>
                                        <td>
                                            <input type="text" class="form-control" name="value" value="<?php echo e($specificdata->value); ?>">
                                        </td>
                                        <td>
                                            <button type="submit" class="btn btn-sm btn-warning">Update</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div>

            <div class="mb-4">
  <p><strong>Rule 1.-</strong> Set Value <span class="badge bg-primary">10</span> means <em>1.0 to 1.9</em></p>
  <p><strong>Rule 2.-</strong> Set Value <span class="badge bg-primary">20</span> means <em>2.0 to 2.9</em></p>
</div>
<div class="mb-4">
  <p><strong>Rule 3.-</strong> Set Value <span class="badge bg-primary">30</span> means <em>3.0 to 3.9</em></p>
  <p><strong>Rule 4.-</strong> Set Value <span class="badge bg-primary">40</span> means <em>4.0 to 4.9</em></p>
</div>
<div class="mb-4">
  <p><strong>Rule 5.-</strong> Set Value <span class="badge bg-primary">1.1 to 10.1</span> or any other means <em>Entered value is result</em></p>
  <p><strong>Rule 6.-</strong> Set Value <span class="badge bg-primary">100</span> means <em>Random result</em></p>
</div>
        </div>
    </div>
</div>
<div class="position-fixed top-3 end-0 p-3" style="z-index: 1080;">
  <div id="toastMessage" class="toast align-items-center bg-success border-0" role="alert" aria-live="assertive" aria-atomic="true">
    <div class="d-flex">
      <div class="toast-body text-white" id="toastBody">
        <!-- Toast message will go here -->
      </div>
      <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
    </div>
  </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>
<script>
$(document).ready(function(){
  const toastElement = document.getElementById('toastMessage');
  const toastBody = document.getElementById('toastBody');
  const toast = new bootstrap.Toast(toastElement);

  $("#crashRuleUpdateForm").on('submit', function(e) {
    e.preventDefault();

    const form = this;
    const formData = new FormData(form);
    const url = "<?php echo e(url('admin/api/editamountsetup')); ?>";

    $.ajax({
      method: "POST",
      url: url,
      data: formData,
      processData: false,
      contentType: false,
      success: function(response) {
        toastBody.textContent = "Update successful.";
        toast.show();
        setTimeout(() => window.location.reload(), 1500);
      },
      error: function(xhr) {
        toastBody.textContent = "Update failed.";
        toastElement.classList.remove('text-bg-success');
        toastElement.classList.add('text-bg-danger');
        toast.show();
        console.error(xhr.responseText);
      }
    });
  });
});
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('Layout.admindashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/rxboss111001001/htdocs/rxboss.111001001.xyz/laravel/resources/views/admin/planecrash.blade.php ENDPATH**/ ?>