

<?php $__env->startSection('content'); ?>
<link href="/assets/vendor/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
<div class="container-fluid my-3 py-3">
  <?php if($errors->get('msgError')): ?>
  <div class="m-3  alert alert-warning alert-dismissible fade show" role="alert">
    <span class="alert-text text-white">
      <?php echo e($errors->first()); ?></span>
    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
      <i class="fa fa-close" aria-hidden="true"></i>
    </button>
  </div>
  <?php endif; ?>
  <?php if(session('success')): ?>
  <div class="m-3  alert alert-success alert-dismissible fade show" id="alert-success" role="alert">
    <span class="alert-text text-white">
      <?php echo e(session('success')); ?></span>
    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
      <i class="fa fa-close" aria-hidden="true"></i>
    </button>
  </div>
  <?php endif; ?>

  <style>
    .after {
      content: "";
      position: absolute;
      height: 0;
      width: 0;
      left: 100%;
      top: 0;
      border: 20px dotted transparent;
      border-left: 20px dotted red;
    }
  </style>


  <div class="row mb-5">
    <div class="col-lg-2">
      <div class="card position-sticky top-1">
        <!--<h4>Setting Menu</h4>-->
        <div class="nav nav-pills flex-column bg-white p-3 nav-pills-custom" id="v-pills-tab" role="tablist" aria-orientation="vertical">
          <br>

          <!--tab Homescreen Setting-->
          <li class="nav-item" id="home-section_tab" data-bs-toggle="pill" data-bs-target="#v-pills-home" type="button" role="tab" aria-controls="v-pills-home" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-home" data-scroll="" href="#home">
              Home Message
            </a>
          </li>
          <hr style="margin:0;">
          <!--tab Task Setting-->
          <li class="nav-item" id="task-section_tab" data-bs-toggle="pill" data-bs-target="#v-pills-task" type="button" role="tab" aria-controls="v-pills-task" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-task" data-scroll="" href="#task">
              Daily Task Limit
            </a>
          </li>
          <hr style="margin:0;">
          <!--tab Referaal Setting-->
          <li class="nav-item" id="referral-section_tab" data-bs-toggle="pill" data-bs-target="#v-pills-referral" type="button" role="tab" aria-controls="v-pills-referral" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-referral" data-scroll="" href="#referral">
              Referral Setting
            </a>
          </li>
          <hr style="margin:0;">
          <!--tab Daily checkin-->
          <li class="nav-item" id="daily-section_tab" data-bs-toggle="tab" data-bs-target="#v-pills-daily" type="button" role="tab" aria-controls="v-pills-daily" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-daily" href="#daily">
              Daily Activity Bonus
            </a>
          </li>
          <hr style="margin:0;">

          <!--tab Spin-->
          <li class="nav-item " id="lucky-section_tab" data-bs-toggle="tab" data-bs-target="#v-pills-lucky" type="button" role="tab" aria-controls="v-pills-lucky" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-lucky" href="#lucky">
              Lucky Wheel
            </a>
          </li>
          <hr style="margin:0;">

          <!--tab Scratch-->
          <li class="nav-item" id="scratch-section_tab" data-bs-toggle="tab" data-bs-target="#v-pills-scratch" type="button" role="tab" aria-controls="v-pills-scratch" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-scratch" href="#scratch">
              Scratch Card
            </a>
          </li>

          <!--tab Quiz-->
          <hr style="margin:0;">
          <li class="nav-item" id="quiz-section_tab" data-bs-toggle="tab" data-bs-target="#v-pills-quiz" type="button" role="tab" aria-controls="v-pills-quiz" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-quiz" data-scroll="" href="#quiz">
              Math Quiz
            </a>
          </li>

          <!--tab Daily Mission-->
          <hr style="margin:0;">
          <li class="nav-item" id="daily_mission-section_tab" data-bs-toggle="tab" data-bs-target="#v-pills-daily_mission" type="button" role="tab" aria-controls="v-pills-daily_mission" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-daily_mission" data-scroll="" href="#daily_mission">
              Daily Mission
            </a>
          </li>

          <!--tab leaderboard-->
          <hr style="margin:0;">
          <li class="nav-item" id="leaderboard-section_tab" data-bs-toggle="tab" data-bs-target="#v-pills-leaderboard" type="button" role="tab" aria-controls="v-pills-leaderboard" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-leaderboard" data-scroll="" href="#leaderboard">
              LeaderBoard Bonus
            </a>
          </li>

          <hr style="margin:0;">
          <!--tab general Setting-->
          <li class="nav-item" id="general-section_tab" data-bs-toggle="pill" data-bs-target="#v-pills-general" type="button" role="tab" aria-controls="v-pills-general" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-general" data-scroll="" href="#general">
              App Info
            </a>
          </li>


          <hr style="margin:0;">
          <!--tab social Setting-->
          <li class="nav-item" id="social-section_tab" data-bs-toggle="pill" data-bs-target="#v-pills-social" type="button" role="tab" aria-controls="v-pills-social" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-social" data-scroll="" href="#social">
              Social Links
            </a>
          </li>


          <hr style="margin:0;">
          <!--tab Update Setting-->
          <li class="nav-item" id="update-section_tab" data-bs-toggle="pill" data-bs-target="#v-pills-update" type="button" role="tab" aria-controls="v-pills-update" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-update" data-scroll="" href="#update">
              Update & Maintenance
            </a>
          </li>

          <hr style="margin:0;">
          <!--tab Policy Setting-->
          <li class="nav-item" id="privacy_policy-section_tab" data-bs-toggle="pill" data-bs-target="#v-pills-privacy_policy" type="button" role="tab" aria-controls="v-pills-privacy_policy" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-privacy_policy" data-scroll="" href="#privacy_policy">
              Privacy Policy
            </a>
          </li>

          <hr style="margin:0;">
          <!--tab Adstxt Setting-->
          <li class="nav-item" id="ads_txt-section_tab" data-bs-toggle="pill" data-bs-target="#v-pills-ads_txt" type="button" role="tab" aria-controls="v-pills-ads_txt" aria-selected="false">
            <a class="nav-link text-sm" id="a-v-pills-ads_txt" data-scroll="" href="#ads_txt">
              Ads Txt
            </a>
          </li>

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

    <div class="col-lg-10 mt-lg-0 mt-4">
      <div class="tab-content" id="pills-tabContent">
        <div class="tab-content bg-white shadow p-5 rounded-3" id="v-pills-tabContent">
          <!--tab content start form-->


          <!--Home Start------------->
          <div class="tab-pane fade " id="v-pills-home" role="tabpanel" aria-labelledby="home-section-tab">
            <h5 class="mb-0">Home Screen Message</h5>
            <br>

            <form method="post" action="/setting/update">
              <?php echo csrf_field(); ?>
              <input type="hidden" name="type" value="home">
              <hr class="horizontal dark my-2">
              
              <div class="col-sm-12">
                  <label class="form-label">Snowfall Effect</label>
                  <div class="input-group">
                    <select name="snowfall_effect" class="form-control">
                      <option value="true" <?php echo e(($setting[0]->snowfall_effect == 'true' ? 'selected' : '')); ?>>ON</option>
                      <option value="false" <?php echo e(($setting[0]->snowfall_effect == 'false' ? 'selected' : '')); ?>>OFF</option>
                    </select>
                  </div>
                </div>
                
              <div class="col-sm-12 mt-3">
                <label class="form-label">Home Screen Message</label>
                <div class="input-group">
                  <input class="form-control" type="text" name="homeMsg" value="<?php echo e($setting[0]->homeMsg); ?>" required>
                </div>
              </div>

              <button type="submit" class="btn bg-gradient-info mt-3">Save</button>
            </form>
          </div>
          <!--Home End*------------->


          <!--Task Start------------->
          <div class="tab-pane fade " id="v-pills-task" role="tabpanel" aria-labelledby="task-section-tab">
            <h5 class="mb-0">Daily Task Setting</h5>
            <br>

            <form method="post" action="/setting/update">
              <?php echo csrf_field(); ?>
              <input type="hidden" name="type" value="task">


               <div class="row">
                            <div class="col-sm-4 col-lg-4">
                                <label class="form-label "><label class="text-info text-sm m-0">Article </label> Task Daily Limit </label>
                                <div class="input-group">
                                    <input type="number" class="form-control " placeholder="1" name="task_web"  value="<?php echo e($task->task_web); ?>"  onfocus="focused(this)" onfocusout="defocused(this)" required>
                                </div>
                            </div>
                            
                            <div class="col-sm-4 col-lg-4">
                                <label class="form-label "><label class="text-info text-sm m-0">VIDEO </label> Task Daily Limit </label>
                                <div class="input-group">
                                <input type="number" class="form-control " placeholder="1" name="task_video"  value="<?php echo e($task->task_video); ?>" onfocus="focused(this)" onfocusout="defocused(this)" required>
                                </div>
                            </div>
                            
                             <div class="col-sm-4 col-lg-4">
                                <label class="form-label "><label class="text-info text-sm m-0">VIDEOZONE(Rewarded Ads) </label> Task Daily Limit </label>
                                <div class="input-group">
                                <input type="number" class="form-control " placeholder="1" name="task_videozone"  value="<?php echo e($task->task_videozone); ?>" onfocus="focused(this)" onfocusout="defocused(this)" required>
                                </div>
                            </div>
                        </div>
                        
                        <div class="row mt-2">
                            <div class="col-sm-4 col-lg-4">
                                <label class="form-label "><label class="text-info text-sm m-0">MATH QUIZ </label> Task Daily Limit </label>
                                <div class="input-group">
                                <input type="number" class="form-control " placeholder="1" name="task_quiz"  value="<?php echo e($task->task_quiz); ?>" onfocus="focused(this)" onfocusout="defocused(this)" required>
                                </div>
                            </div>
                            
                            <div class="col-sm-4 col-lg-4">
                                <label class="form-label "><label class="text-info text-sm m-0">DAILY OFFER </label> Task Daily Limit </label>
                                <div class="input-group">
                                <input type="number" class="form-control " placeholder="1" name="task_daily_offer" value="<?php echo e($task->task_daily_offer); ?>" onfocus="focused(this)" onfocusout="defocused(this)" required>
                                </div>
                            </div>
                            
                             <div class="col-sm-4 col-lg-4">
                                <label class="form-label "><label class="text-info text-sm m-0">SPIN </label> Task Daily Limit </label>
                                <div class="input-group">
                                <input type="number" class="form-control " placeholder="1" name="task_spin" value="<?php echo e($task->task_spin); ?>" onfocus="focused(this)" onfocusout="defocused(this)" required>
                                </div>
                            </div>
                        </div>
                        
                        <div class="row mt-2">
                            <div class="col-sm-4 col-lg-4">
                                <label class="form-label "><label class="text-info text-sm m-0">SCRATCH </label> Task Daily Limit </label>
                                <div class="input-group">
                                <input type="number" class="form-control " placeholder="1" name="task_scratch"  value="<?php echo e($task->task_scratch); ?>" onfocus="focused(this)" onfocusout="defocused(this)" required>
                                </div>
                            </div>
                          
                        </div>

              <button type="submit" class="btn bg-gradient-info mt-3">Save</button>
            </form>
          </div>
          <!--Refferal End*------------->

          <!--Refferal Start------------->
          <div class="tab-pane fade " id="v-pills-referral" role="tabpanel" aria-labelledby="referral-section-tab">
            <h5 class="mb-0">Refferal Setting</h5>
            <br>

            <form method="post" action="/setting/update">
              <?php echo csrf_field(); ?>
              <input type="hidden" name="type" value="referral">

              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Referral</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Welcome Bonus,Referral Coin
                </figcaption>
              </figure>

              <div class="row">
                <div class="col-sm-12">
                  <label class="form-label">Refer Bonus Credit Mode</label>
                  <div class="input-group">
                    <select name="refer_mode" class="form-control">
                      <option value="direct" <?php echo e(($data[0]->refer_mode == 'direct' ? 'selected' : '')); ?>>Direct ( When Ram put John refer code then both Ram(<?php echo e($data[0]->refer_join_bonus); ?>) and John(<?php echo e($data[0]->refer_bonus); ?>) get bonus instantly)</option>
                      <option value="redeem" <?php echo e(($data[0]->refer_mode == 'redeem' ? 'selected' : '')); ?>>After Redeem ( When Ram put John refer code. Ram will get <?php echo e($data[0]->refer_join_bonus); ?> bonus instantly. and when Ram submit his first redeem then John will get <?php echo e($data[0]->refer_bonus); ?> bonus</option>
                    </select>
                  </div>
                </div>

                <hr class="horizontal dark my-2">
                <div class="col-sm-12">
                  <label class="form-label">Welcome Bonus</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="welcome_bonus" value="<?php echo e($data[0]->welcome_bonus); ?>" placeholder="10" required>
                  </div>
                </div>
                
                <hr class="horizontal dark my-2">
                <div class="col-sm-12">
                  <label class="form-label">Who referred the user:</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="refer_bonus" value="<?php echo e($data[0]->refer_bonus); ?>" placeholder="10" required>
                  </div>
                </div>
                
                <hr class="horizontal dark my-2">
                <div class="col-sm-12">
                  <label class="form-label">Who Entered referral code::</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="refer_join_bonus" value="<?php echo e($data[0]->refer_join_bonus); ?>" placeholder="10" required>
                  </div>
                </div>
  

                <hr class="horizontal dark my-2">
                <label for="projectName" class="form-label">App Share Message</label>
                <textarea name="refer_msg" class="ckeditor form-control"><?php echo e($setting[0]->refer_msg); ?></textarea>

              </div>

              <button type="submit" class="btn bg-gradient-info mt-3">Save</button>
            </form>
          </div>
          <!--Refferal End*------------->



          <!--Daily Bonus Start--------->
          <div class="tab-pane fade " id="v-pills-daily" role="tabpanel" aria-labelledby="daily-section-tab">
            <h5 class="mb-0">Daily Activity Bonus Reward</h5>
            <br>

            <form method="post" action="/setting/update">
              <?php echo csrf_field(); ?>
              <input type="hidden" name="type" value="daily">

              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2">Daily Bonus</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  User get Daily Bonus on Each Day
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Monday</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="day1" value="<?php echo e($daily[0]->d1); ?>" placeholder="10" required>
                  </div>
                </div>

                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Tuesday</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="day2" value="<?php echo e($daily[0]->d2); ?>" placeholder="10" required>
                  </div>
                </div>

                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Wednesday</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="day3" value="<?php echo e($daily[0]->d3); ?>" placeholder="10" required>
                  </div>
                </div>

                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Thursday</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="day4" value="<?php echo e($daily[0]->d4); ?>" placeholder="10" required>
                  </div>
                </div>

              </div>
              <div class="row mt-2">
                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Friday</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="day5" value="<?php echo e($daily[0]->d5); ?>" placeholder="10" required>
                  </div>
                </div>

                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Saturday</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="day6" value="<?php echo e($daily[0]->d6); ?>" placeholder="10" required>
                  </div>
                </div>


                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Sunday</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="day7" value="<?php echo e($daily[0]->d7); ?>" placeholder="10" required>
                  </div>
                </div>

              </div>

              <button type="submit" class="btn bg-gradient-info mt-3">Save</button>
            </form>
          </div>
          <!--Daily Bonus End------------>


          <!--pill lucky spin---------->
          <div class="tab-pane fade " id="v-pills-lucky" role="tabpanel" aria-labelledby="lucky-section_tab">
            <h5 class="mb-0">Lucky Wheel </h5>
            <form method="post" action="/setting/update">
              <?php echo csrf_field(); ?>
              <input type="hidden" name="type" value="spin">

              <br>
              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Lucky Spin Time Interval</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  After One Lucky Spin Done How Much Time next Lucky Spin will be Unlock
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-6">
                  <label class="form-label">Time Interval in Second</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="spin_interval" value="<?php echo e($data[0]->spin_interval); ?>" placeholder="20" required>
                  </div>
                </div>
              </div>

              <br>
              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Lucky Spin Ad Interval</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Ad Interval Beetween Lucky Spin
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-6">
                  <label class="form-label">Ad Interval</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="spin_adinterval" value="<?php echo e($data[0]->spin_adinterval); ?>" placeholder="1" required>
                  </div>
                </div>
              </div>

              <br>
              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Lucky Spin AdNetwork</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Select AdNetwork which Ad you want to show in Lucky Spin
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-6">
                  <label class="form-label">Select AdNetwork</label>
                  <div class="input-group">
                    <select name="spin_ad" class="form-control">
                      <?php $__currentLoopData = $ads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <option value="<?php echo e($item->type); ?>" <?php echo e(($data[0]->spin_ad ==$item->type ) ? 'selected' : ''); ?>><?php echo e($item->title); ?></option>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                  </div>
                </div>
              </div>

              <button type="submit" class="btn bg-gradient-info mt-3">Save</button>
            </form>

            <hr>

            <div class="">
              <!-- Card header -->
              <div class="ms-auto my-auto">
                <a href="#" class="btn bg-gradient-info btn-sm mb-0 addSpin">+&nbsp; ADD NEW</a>
              </div>
              <div class="card-body px-0 pb-0">
                <div class="table-responsive">

                  <table class="table table-flush" id="data-list">
                    <thead class="thead-light">
                      <tr>
                        <th>SELECT</th>
                        <th>COIN</th>
                        <th>COLOR</th>
                        <th>ACTION</th>
                      </tr>
                    </thead>
                    <tbody>
                      <?php if(count($spin) > 0): ?>
                      <?php $__currentLoopData = $spin; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <tr id="<?php echo e($item->id); ?>">
                        <td class="text-sm"> #<?php echo e($loop->iteration); ?></td>
                        <td class="text-sm"><?php echo e($item->coin); ?></td>
                        <td class="text-sm"><input class="form-control" type="color" value="<?php echo e($item->color); ?>" readonly /></td>
                        <td class="text-sm">
                          <a href="#" class="mx-3 editSpin" id="<?php echo e($item->id); ?>" data-bs-toggle="tooltip" data-bs-original-title="Edit">
                            <i class="fas fa-edit text-success"></i>
                          </a>
                          <a href="#" data-id="spin" id="<?php echo e($item->id); ?>" class="mx-3 delete" data-bs-toggle="tooltip" data-bs-original-title="Delete">
                            <i class="fas fa-trash text-danger"></i>
                          </a>
                        </td>
                      </tr>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      <?php else: ?>
                      <tr>no content </tr>
                      <?php endif; ?>
                    </tbody>
                  </table>

                </div>
              </div>
            </div>
          </div>
          <!--End lucky Spin-------->


          <!--Scratch Start--------->
          <div class="tab-pane fade " id="v-pills-scratch" role="tabpanel" aria-labelledby="scratch-section-tab">
            <h5 class="mb-0">Scratch Card</h5>
            <br>

            <form method="post" action="/setting/update">
              <?php echo csrf_field(); ?>
              <input type="hidden" name="type" value="scratch">

              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Scratch Card</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Set Scratch Card Minimum & Maximum Coin Reward.
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-4">
                  <label class="form-label">Scratch Reward Range ( Minimum, Maximum)</label>
                  <div class="input-group">
                    <input class="form-control" type="text" name="scratch_coin" value="<?php echo e($data[0]->scratch_coin); ?>" placeholder="5-10" required>
                  </div>
                </div>
              </div>

              <br>
              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Scratch Time Interval</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  After One Scratch Done How Much Time next Scratches will be Unlock
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-6">
                  <label class="form-label">Time Interval in Second</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="scratch_interval" value="<?php echo e($data[0]->scratch_interval); ?>" placeholder="20" required>
                  </div>
                </div>
              </div>

              <br>
              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Scratch Ad Interval</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Ad Interval Beetween Scratch Card
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-6">
                  <label class="form-label">Ad Interval</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="scratch_adinterval" value="<?php echo e($data[0]->scratch_adinterval); ?>" placeholder="1" required>
                  </div>
                </div>
              </div>

              <br>
              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Scratch AdNetwork</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Select AdNetwork which Ad you want to show in Scratch Card
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-6">
                  <label class="form-label">Select AdNetwork</label>
                  <div class="input-group">
                    <select name="scratch_ad" class="form-control">
                      <?php $__currentLoopData = $ads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <option value="<?php echo e($item->type); ?>" <?php echo e(($data[0]->scratch_ad ==$item->type ) ? 'selected' : ''); ?>><?php echo e($item->title); ?></option>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                  </div>
                </div>
              </div>

              <button type="submit" class="btn bg-gradient-info mt-3">Save</button>
            </form>
          </div>
          <!--Scratch End------------>


          <!--Quiz Start------------->
          <div class="tab-pane fade " id="v-pills-quiz" role="tabpanel" aria-labelledby="quiz-section-tab">
            <h5 class="mb-0">Math Quiz</h5>
            <br>

            <form method="post" action="/setting/update">
              <?php echo csrf_field(); ?>
              <input type="hidden" name="type" value="quiz">

              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Math Quiz</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Set Math Quiz Minimum & Maximum Coin Reward.
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-4">
                  <label class="form-label">Math Quiz Reward Range ( Minimum, Maximum)</label>
                  <div class="input-group">
                    <input class="form-control" type="text" name="quiz_coin" value="<?php echo e($data[0]->quiz_coin); ?>" placeholder="5-10" required>
                  </div>
                </div>
              </div>

              <br>
              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Math Quiz Time Interval</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  After One Math Quiz Done How Much Time next Math Quiz will be Unlock
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-6">
                  <label class="form-label">Time Interval in Second</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="quiz_interval" value="<?php echo e($data[0]->quiz_interval); ?>" placeholder="20" required>
                  </div>
                </div>
              </div>

              <br>
              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Math Quiz Ad Interval</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Ad Interval Beetween Math Quiz
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-6">
                  <label class="form-label">Ad Interval</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="quiz_adinterval" value="<?php echo e($data[0]->quiz_adinterval); ?>" placeholder="1" required>
                  </div>
                </div>
              </div>

              <br>
              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2"> Math Quiz AdNetwork</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Select AdNetwork which Ad you want to show in Math Quiz
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-6">
                  <label class="form-label">Select AdNetwork</label>
                  <div class="input-group">
                    <select name="quiz_ad" class="form-control">
                      <?php $__currentLoopData = $ads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <option value="<?php echo e($item->type); ?>" <?php echo e(($data[0]->quiz_ad ==$item->type ) ? 'selected' : ''); ?>><?php echo e($item->title); ?></option>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

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

              <button type="submit" class="btn bg-gradient-info mt-3">Save</button>
            </form>
          </div>
          <!--Quiz End*------------->


          <!--Mission Start------------->
          <div class="tab-pane fade " id="v-pills-daily_mission" role="tabpanel" aria-labelledby="daily_mission-section-tab">
            <?php echo e(View::make('pages.mission',['data'=>$mission])); ?>

          </div>
          <!--Mission End*------------->

          <!--Leaderboard Start--------->
          <div class="tab-pane fade " id="v-pills-leaderboard" role="tabpanel" aria-labelledby="leaderboard-section-tab">
            <h5 class="mb-0">Top Leaderboard Bonus</h5>
            <br>

            <form method="post" action="/setting/update">
              <?php echo csrf_field(); ?>
              <input type="hidden" name="type" value="leaderboard">

              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2">Daily Leaderboard Bonus</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Top 3 User get Daily Bonus
                </figcaption>
              </figure>
              <div class="row">
                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Top 1 User will get Bonus</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="daily_leaderboard1" value="<?php echo e($data[0]->daily_leaderboard1); ?>" placeholder="10" required>
                  </div>
                </div>

                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Top 2 User will get Bonus</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="daily_leaderboard2" value="<?php echo e($data[0]->daily_leaderboard2); ?>" placeholder="10" required>
                  </div>
                </div>

                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Top 3 User will get Bonus</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="daily_leaderboard3" value="<?php echo e($data[0]->daily_leaderboard3); ?>" placeholder="10" required>
                  </div>
                </div>
              </div>

              <br>
              <figure>
                <blockquote class="blockquote">
                  <h6>
                    <p class="ps-2">Weekly Leaderboard Bonus</p>
                  </h6>
                </blockquote>
                <figcaption class="blockquote-footer ps-3">
                  Top 3 User get Weekly Bonus
                </figcaption>
              </figure>

              <div class="row mt-2">
                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Top 1 User will get Bonus</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="weekly_leaderboard1" value="<?php echo e($data[0]->weekly_leaderboard1); ?>" placeholder="10" required>
                  </div>
                </div>

                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Top 2 User will get Bonus</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="weekly_leaderboard2" value="<?php echo e($data[0]->weekly_leaderboard2); ?>" placeholder="10" required>
                  </div>
                </div>


                <div class="col-sm-12 col-lg-3">
                  <label class="form-label">Top 3 User will get Bonus</label>
                  <div class="input-group">
                    <input class="form-control" type="number" name="weekly_leaderboard3" value="<?php echo e($data[0]->weekly_leaderboard3); ?>" placeholder="10" required>
                  </div>
                </div>

              </div>

              <button type="submit" class="btn bg-gradient-info mt-3">Save</button>
            </form>
          </div>
          <!--Leaderboard End------------>

          <!--General Start------------->
          <div class="tab-pane fade " id="v-pills-general" role="tabpanel" aria-labelledby="general-section-tab">
            <h5 class="mb-0">General Setting</h5>
            <br>
            <?php echo e(View::make('setting.general',['data'=>$setting])); ?>

          </div>
          <!--General End*------------->

         
        <!--Social Start------------->
        <div class="tab-pane fade " id="v-pills-social" role="tabpanel" aria-labelledby="social-section-tab">
          <?php echo e(View::make('pages.social',['data'=>$social])); ?>

        </div>
        <!--Social End*------------->


        <!--Update Start------------->
        <div class="tab-pane fade " id="v-pills-update" role="tabpanel" aria-labelledby="update-section-tab">
          <?php echo e(View::make('setting.update',['data'=>$setting])); ?>

        </div>
        <!--Update End*------------->

        <!--Privacy Start------------->
        <div class="tab-pane fade " id="v-pills-privacy_policy" role="tabpanel" aria-labelledby="privacy_policy-section-tab">
          <label for="projectName" class="form-label">Privacy Policy URL : <a href="<?php echo e(env('APP_URL')); ?>privacy-policy" target="_blank"><?php echo e(env('APP_URL')); ?>privacy-policy</a></label>
          <div class="">
            <form action="/setting/update" method="POST">
              <?php echo csrf_field(); ?>
              <input type="hidden" name="type" value="privacy_policy">

              <hr class="horizontal dark my-2">
              <label for="projectName" class="form-label">Privacy Policy</label>
              <textarea name="privacy_policy" class="ckeditor form-control"><?php echo e($db[0]->privacy_policy); ?></textarea>

              <div class="d-flex justify-content-end mt-4">
                <button type="submit" name="button" class="btn bg-gradient-primary m-0 ms-2">Save Changes</button>
              </div>
            </form>
          </div>
        </div>
        <!--Privacy End*------------->

        <!--Ads.txt Start------------->
        <div class="tab-pane fade " id="v-pills-ads_txt" role="tabpanel" aria-labelledby="ads_txt-section-tab">
          <div class="">
            <label for="projectName" class="form-label">Ads txt URL : <a href="<?php echo e(env('APP_URL')); ?>app-ads.txt" target="_blank"><?php echo e(env('APP_URL')); ?>app-ads.txt</a></label>

            <form action="/setting/update" method="POST">
              <?php echo csrf_field(); ?>
              <input type="hidden" name="type" value="ads_txt">

              <hr class="horizontal dark my-2">
              <label for="projectName" class="form-label">Ads txt</label>
              <textarea name="ads_txt" class="ckeditor form-control"><?php echo e($db[0]->ads_txt); ?></textarea>

              <div class="d-flex justify-content-end mt-4">
                <button type="submit" name="button" class="btn bg-gradient-primary m-0 ms-2">Save Changes</button>
              </div>
            </form>
          </div>
        </div>
        <!--Ads.txt*------------->

      </div>

      <!-- Card Profile -->

      <!-- Card Basic Info -->
    </div>
  </div>
  <?php $__env->stopSection(); ?>
  <?php echo $__env->make('modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

  <?php $__env->startPush('js'); ?>
  <script src="<?php echo e(URL::asset('assets/js/plugins/modal.js')); ?>"></script>
  <script src="<?php echo e(URL::asset('assets/js/plugins/datatables.js')); ?>"></script>
  <script src="../../assets/js/plugins/sweetalert.min.js"></script>
  <script src="../../assets/js/plugins/action.js"></script>
  <script src="//cdn.ckeditor.com/4.14.1/standard/ckeditor.js"></script>
  <script src="<?php echo e(URL::asset('assets/js/plugins/choices.min.js')); ?>"></script>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>

  <script>
    document.querySelectorAll(".export").forEach(function(el) {
      el.addEventListener("click", function(e) {
        var type = el.dataset.type;

        var data = {
          type: type,
          filename: "alias-" + type,
        };

        if (type === "csv") {
          data.columnDelimiter = "|";
        }

        dataTableSearch.export(data);
      });
    });
    };
  </script>

  <script>
    $("body").on("click", ".addSocialLink", function() {
      $("#sociallinkModal").modal('show');
    });

  </script>

  <script>
    $(document).ready(function() {
      $("#alert-success").delay(3000).slideUp(300);

      var url = document.location.toString();
      console.log('selected_t ' + url);

      if (url.match('#')) {
        var tag = url.split('#')[1];
        if (tag == '') {
          activaTab('#v-pills-referral');
        } else {
          activaTab('#v-pills-' + tag);
        }

      } else {
        activaTab('#v-pills-referral');
      }

    });

    function activaTab(tab) {
      $(tab).removeClass('tab-pane fade').addClass('tab-pane fade show active');
      disableAll(tab.replace('#v-pills-', ''));
    };

    $('#a-v-pills-daily').click(function() {
      disableAll('daily');
    });

    $('#a-v-pills-lucky').click(function() {
      disableAll('lucky');
    });

    $('#a-v-pills-scratch').click(function() {
      disableAll('scratch');
    });

    $('#a-v-pills-referral').click(function() {
      disableAll('referral');
    });

    $('#a-v-pills-quiz').click(function() {
      disableAll('quiz');
    });

    $('#a-v-pills-general').click(function() {
      disableAll('general');
    });

    $('#a-v-pills-update').click(function() {
      disableAll('update');
    });

    $('#a-v-pills-social').click(function() {
      disableAll('social');
    });

    $('#a-v-pills-home').click(function() {
      disableAll('home');
    });

    $('#a-v-pills-daily_mission').click(function() {
      disableAll('daily_mission');
    });

    $('#a-v-pills-ads_txt').click(function() {
      disableAll('ads_txt');
    });

    $('#a-v-pills-privacy_policy').click(function() {
      disableAll('privacy_policy');
    });

    $('#a-v-pills-leaderboard').click(function() {
      disableAll('leaderboard');
    });

$('#a-v-pills-task').click(function() {
      disableAll('task');
    });



    if (document.getElementById('choices-tag')) {
      var tag = document.getElementById('choices-tag');
      const example = new Choices(tag);
    }

    if (document.getElementById('choices-tag1')) {
      var tag = document.getElementById('choices-tag1');
      const example = new Choices(tag);
    }

    if (document.getElementById('choices-tag2')) {
      var tag = document.getElementById('choices-tag2');
      const example = new Choices(tag);
    }

    function disableAll(type) {

      $('#a-v-pills-daily').css({
        'background': 'white',
        'color': '#3d3f6f'
      });
      $('#a-v-pills-lucky').css({
        'background': 'white',
        'color': '#3d3f6f'
      });
      $('#a-v-pills-scratch').css({
        'background': 'white',
        'color': '#3d3f6f'
      });
    
      $('#a-v-pills-referral').css({
        'background': 'white',
        'color': '#3d3f6f'
      });
      $('#a-v-pills-quiz').css({
        'background': 'white',
        'color': '#3d3f6f'
      });
      $('#a-v-pills-general').css({
        'background': 'white',
        'color': '#3d3f6f'
      });
      $('#a-v-pills-update').css({
        'background': 'white',
        'color': '#3d3f6f'
      });

      $('#a-v-pills-social').css({
        'background': 'white',
        'color': '#3d3f6f'
      });

  

      $('#a-v-pills-home').css({
        'background': 'white',
        'color': '#3d3f6f'
      });
      $('#a-v-pills-daily_mission').css({
        'background': 'white',
        'color': '#3d3f6f'
      });

      $('#a-v-pills-privacy_policy').css({
        'background': 'white',
        'color': '#3d3f6f'
      });

      $('#a-v-pills-ads_txt').css({
        'background': 'white',
        'color': '#3d3f6f'
      });

      $('#a-v-pills-leaderboard').css({
        'background': 'white',
        'color': '#3d3f6f'
      });

      $('#a-v-pills-task').css({
        'background': 'white',
        'color': '#3d3f6f'
      });



      (type == 'daily') ? $('#a-v-pills-daily').css({
        'background': 'green',
        'color': 'white'
      }): '';
      (type == 'lucky') ? $('#a-v-pills-lucky').css({
        'background': 'green',
        'color': 'white'
      }): '';
      (type == 'scratch') ? $('#a-v-pills-scratch').css({
        'background': 'green',
        'color': 'white'
      }): '';
   
      (type == 'referral') ? $('#a-v-pills-referral').css({
        'background': 'green',
        'color': 'white'
      }): '';
      (type == 'quiz') ? $('#a-v-pills-quiz').css({
        'background': 'green',
        'color': 'white'
      }): '';
      (type == 'general') ? $('#a-v-pills-general').css({
        'background': 'green',
        'color': 'white'
      }): '';
      (type == 'update') ? $('#a-v-pills-update').css({
        'background': 'green',
        'color': 'white'
      }): '';

      (type == 'social') ? $('#a-v-pills-social').css({
        'background': 'green',
        'color': 'white'
      }): '';


      (type == 'home') ? $('#a-v-pills-home').css({
        'background': 'green',
        'color': 'white'
      }): '';
      (type == 'daily_mission') ? $('#a-v-pills-daily_mission').css({
        'background': 'green',
        'color': 'white'
      }): '';
      (type == 'ads_txt') ? $('#a-v-pills-ads_txt').css({
        'background': 'green',
        'color': 'white'
      }): '';
      (type == 'ads_txt') ? $('#a-v-pills-ads_txt').css({
        'background': 'green',
        'color': 'white'
      }): '';


      (type == 'leaderboard') ? $('#a-v-pills-leaderboard').css({
        'background': 'green',
        'color': 'white'
      }): '';

      (type == 'task') ? $('#a-v-pills-task').css({
        'background': 'green',
        'color': 'white'
      }): '';
      
    (type == 'privacy_policy') ? $('#a-v-pills-privacy_policy').css({
        'background': 'green',
        'color': 'white'
      }): '';

    }


    $("body").on("click", ".addSpin", function() {
      $("#spinmodal").modal('show');
    });

    $("body").on("click", ".editSpin", function() {
      var current_object = $(this);
      var link = window.location.origin;
      id = current_object.attr('id');
      $.ajax({
        url: '/luckywheel/edit/' + id,
        type: "GET",

        success: function(data) {
          $("#spinupdateModal").modal('show');
          $("#spinid").val(data[0]['id']);
          $("#color").val(data[0]['color']);
          $("#coin").val(data[0]['coin']);

          console.log(data[0]['id']);
        },
      });

    });

    $("body").on("click", ".editMission", function() {
      var current_object = $(this);
      var link = window.location.origin;
      id = current_object.attr('id');
      $.ajax({
        url: '/setting/mission/edit/' + id,
        type: "GET",

        success: function(data) {
          $("#updateMissionModal").modal('show');
          $("#mission_id").val(data[0]['id']);
          $("#mission_icon").val(data[0]['image']);
          $("#mission_title").val(data[0]['title']);
          $("#mission_coin").val(data[0]['coin']);
          $("#mission_promocoin").val(data[0]['promo_coin']);
          $("#missin_btn").val(data[0]['btn_name']);

          console.log(data[0]['id']);
        },
      });

    });

    $(document).ready(function() {
      $("#alert-success").delay(3000).slideUp(300);
    });
  </script>
  <?php $__env->stopPush(); ?>
<?php echo $__env->make('user_type.auth', ['parentFolder' => 'admin-setting', 'childFolder' => 'app-setting'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/souheiljabbour/Sites/lebara.test/resources/views//setting/app.blade.php ENDPATH**/ ?>