<?php
use App\Models\Setting;
use App\Models\GameApi;

$setting = Setting::first();
?>
@extends('layouts.main')
@section('isMobile')
<div class="content my01">

  @include('nav_saldo')

  <!-- <div class="content-loader" *ngIf="subs.state$.requests.getAllGamesViewByCategory.inProgress; else content"><app-spinner></app-spinner> </div> -->


  <div class="container pt-1 sub-games">
    <div>

      <h3 class="title" i18n="">slots PROVIDERS</h3>
      <div class="row">


      </div>

      <div class="scroll-wrapper row" style="height:72px;">

        <div class="left">
          <button class="prev-btn btn" id="left-button"><i class="icon-keyboard_arrow_left"></i></button>
        </div>

        <div style="overflow:hidden;width:100%;" class="scroller">
          <div class="row no-gutters text-center slider-content">
            <!--//hardcoded links.......-->






            <div class="col" style="height:72px;">
              <a class="btn-box" href="/slots/pragmatic-play" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/images/ppslot.gif?v=1" data-src="https://files.sitestatic.net/images/ppslot.gif?v=1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">PRAGMATIC</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/reel-kingdom" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/reelkingdom_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/reelkingdom_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">REEL KINGDOM</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/pgsoft" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/images/pgsoft.gif?v=0.2" data-src="https://files.sitestatic.net/images/pgsoft.gif?v=0.2" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">PGSOFT</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/joker-gaming" rel="opener" style="position:relative;overflow: hidden;">
                <div class="hot-tag"></div>
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/jk_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/jk_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">JOKER</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/habanero" rel="opener" style="position:relative;overflow: hidden;">
                <div class="hot-tag"></div>
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/hb_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/hb_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">HABANERO</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/playtech" rel="opener" style="position:relative;overflow: hidden;">
                <div class="hot-tag"></div>
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/pt_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/pt_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">PLAYTECH</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/microgaming" rel="opener" style="position:relative;overflow: hidden;">
                <div class="hot-tag"></div>
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/mg_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/mg_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">MICRO GAMING</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/hacksaw" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/hacksaw_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/hacksaw_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">HACKSAW</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/relax" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/relax_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/relax_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">RELAX GAMING</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/ygg" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/yggslot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/yggslot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">YGG</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/booming" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/ttg_booming_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/ttg_booming_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">BOOMING</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/cq9" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/cq9_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/cq9_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">CQ9</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/booongo" rel="opener" style="position:relative;overflow: hidden;">
                <div class="hot-tag"></div>
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/booongo_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/booongo_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">BNG</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/toptrend-gaming" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/ttg_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/ttg_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">TOPTREND GAMING</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/spadegaming" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/sg_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/sg_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">SPADE GAMING</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/playngo" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/playngo_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/playngo_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">PLAYNGO</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/fastspin" rel="opener" style="position:relative;overflow: hidden;">
                <div class="hot-tag"></div>
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/fastspin_slot.gif?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/fastspin_slot.gif?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">FASTSPIN</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/skywind" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/skywind_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/skywind_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">SKYWIND</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/playstar" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/playstar_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/playstar_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">PLAYSTAR</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/redtiger" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/redtiger_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/redtiger_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">REDTIGER</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/evoplay" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/evoplay_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/evoplay_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">EVOPLAY</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/netent" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/redtiger_net_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/redtiger_net_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">NETENT</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/nolimitcity" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/nolimitcity_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/nolimitcity_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">NOLIMITCITY</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/mancalagaming" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/mancalagaming_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/mancalagaming_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">MANCALA GAMING</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/eagaming" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/eagaming_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/eagaming_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">EA GAMING</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/nagagames" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/nagagames_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/nagagames_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">NAGA GAMES</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/sbo" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/sbo_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/sbo_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">SBO</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/kagaming" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/kagaming_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/kagaming_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">KA GAMING</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/reevo" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/reevo_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/reevo_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">REEVO</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/dragoonsoft" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/dragoon_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/dragoon_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">DRAGOON SOFT</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/live22" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/live22_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/live22_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">LIVE22</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/fachai" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/fachai_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/fachai_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">FACHAI</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/apollo777" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/apollo777_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/apollo777_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">APOLLO777</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box active" href="/slots/advantplay" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/advantplay_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/advantplay_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">ADVANTPLAY</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/bgaming" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/bgaming_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/bgaming_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">BGAMING</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/jdb" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/jdb_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/jdb_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">JDB</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/jili" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/jili_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/jili_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">JILI</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/568win" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/sbo_568win_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/sbo_568win_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">568 WIN</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/i8" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/i8_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/i8_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">i8</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/gmw" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/gmw_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/gmw_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">GMW</h5>
              </a>
            </div>



            <div class="col" style="height:72px;">
              <a class="btn-box " href="/slots/dodo-gaming" rel="opener" style="position:relative;overflow: hidden;">
                <img alt="" src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/dodo_slot.png?v=0.1" data-src="https://files.sitestatic.net/assets/imgs/game_logos/100x70/dodo_slot.png?v=0.1" *ngif="showEle" style="width: 70px; height: 50px;">

                <h5 class="text-center game-title">DODO GAMING</h5>
              </a>
            </div>


          </div>
        </div>
        <div class="right">
          <button class="next-btn btn" id="right-button"><i class="icon-keyboard_arrow_right"></i></button>
        </div>


      </div>
    </div>


    <div class="row no-gutters filter">
      <div class="col-xs-10 text-center">
        <div class="row">
          <div class="col-xs-3">
            <button class="btn btn-clear f" data-filter="NEW" [ngclass]="{ 'active': filterProperty==FilterType.New  }">BARU</button>
          </div>
          <div class="col-xs-3">
            <button class="btn btn-clear f" data-filter="TOP" [ngclass]="{ 'active': filterProperty==FilterType.Top  }">TOP</button>
          </div>
          <div class="col-xs-3">
            <button class="btn btn-clear f active" data-filter="ALL" [ngclass]="{ 'active': filterProperty==FilterType.All  }">SEMUA </button>
          </div>
        </div>
      </div>
      <div class="col-xs-1 text-right">
        <button class="btn btn-clear" id="btnFilters_003" data-filter="" data-trigger="nifty" data-target="#searchModal"><i class="icon-magnifier"></i></button>
      </div>
      <div class="col-xs-1 text-right">
        <button class="btn btn-clear" id="btnFilters_003" data-filter="" data-trigger="nifty" data-target="#filterModal-2"><i class="icon-equalizer2"></i></button>
      </div>
    </div>
    <div class="mobile-border"></div>
    <div class="mobile-border"></div>
    <br>
    <input type="hidden" value="pgsoft_slot" name="hiddenGameID-001" id="hiddenGameID-001">
    @php
    $response = GameApi::getGameList('GB'); // Ganti 'xxx' dengan kode provider yang valid

    // Periksa jika respons status 'success' dan data GameList tersedia
    if ($response['status'] == 'success' && isset($response['gamelist'])) {
    $gamelist = $response['gamelist']; // Isi $gamelist dengan data GameList dari respons
    } else {
    $gamelist = []; // Inisialisasi $gamelist sebagai array kosong jika key 'gamelist' tidak ditemukan
    }
    @endphp
    <div class="row games no-gutters">
      @if(count($gamelist) > 0)
      @foreach ($gamelist as $game)
      @if($game['game_provider'] == 'GB' && $game['game_type'] == 'SL')
      <a class="col-xs-4 col-md-3 game-box text-center" data-title="{{ $game['game_name'] }}" data-filter="ALL,slot,TOP,NEW" [ngclass]="{'flex-grow-2' : game.FlexGrow =='2'}" onclick="showGameLinks(event,    '{{ $game['game_name'] }}', '{{ $game['game_image'] }}' , '{{ $game['game_code'] }}', '' )" style="display: none;">

        <div class="content-wrapper">

          <img class=" lazy" data-src="{{ $game['game_image'] }}" src="" *ngif="showEle"> <!--/*IMAGE MIN WIDTH MUST BE 146, MAX 6 game-box per row */-->
        </div>
        <h5 data-title="{{ $game['game_name'] }}">{{ $game['game_name'] }}</h5>
      </a>
      @endif
      @endforeach
    </div>
    @else
    <p>
      No games available.
    </p>
    @endif
  </div>

  <div class="nifty-modal slide-in-bottom " id="gamelinksModal-1">
    <div class="md-content">
      <div class="md-body">
        <div class="row mb-4 no-gutters">
          <div class="col-xs-5">
            <img src="" class="img-fluid">
          </div>
          <div class="col-xs-7">
            <div class="g-title"></div>
          </div>
          <input type="hidden" value="" name="hiddenGameCode001" id="hiddenGameCode001">
          <input type="hidden" value="" name="hiddenSubGameCode001" id="hiddenSubGameCode001">

        </div>

        <div class="row  pt-2">
          <div class="col-xs-5">
          </div>
          <div class="col-xs-7   ">
            <button class="btn  btn-block btn-primary" onclick="subGameLaunch(event,0)" i18n="@PlayNow">
              MAIN SEKARANG					</button>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="md-overlay"></div>
  @if (Auth::check())
  <script>
    function subGameLaunch(event) {

      event.preventDefault();

      var gameUrl = '{{ URL::to('/') }}/subGameLaunch?playerCode={{ Auth::user()->extplayer }}&gameid=' + $('#hiddenGameCode001').val();
      var newTab = window.open('', '_blank');

      if (newTab) {

        $.ajax({
          type: 'GET',
          url: gameUrl,
          success: function(response) {
            var gameUrlResponse = response.gameUrl;
            console.log('Game URL:', gameUrlResponse);

            newTab.location.href = gameUrlResponse;
          },
          error: function(xhr, status, error) {
            console.error(error);
          }
        });
      } else {
        console.error('Gagal membuka tab baru. Periksa pengaturan popup blocker.');
      }
    }
  </script>
  @else
  <script>
    function subGameLaunch(e, isDemo) {

      Swal.fire({
        icon: 'error',
        title: 'Warning!',
        text: 'Silahkan login terlebih dahulu sebelum membuka permainan',
        showCancelButton: false,
        confirmButtonColor: '#3085d6',
        confirmButtonText: 'OK'
      });
    }
  </script>
  @endif
  <div class="nifty-modal slide-in-bottom " id="filterModal-2">
    <div class="md-content">
      <div class="md-body">
        <div>
          <p id="" i18n="">
            Select a filter :
          </p>
        </div>
        <div>
          <button class="btn btn-primary" id="btnApplyFilter_01">APPLY</button>
        </div>
      </div>
    </div>
  </div>
  <div class="md-overlay"></div>

  <div class="nifty-modal slide-in-bottom " id="searchModal">
    <div class="md-content">
      <div class="md-body">
        <div>
          <div class="search_filter">
            <span class="srch_icon md-close"><i class="icon-keyboard_arrow_left"></i></span>
            <input type="text" matinput="" placeholder="Search" [(ngmodel)]="filterInput" maxlength="255" class="search" (change)="search($event)" i18n-placeholder="@Search">
            <button matsuffix="" class="btn srch_button" (click)="clearSearch($event)"><i class="icon-x-square"></i></button>
          </div>
        </div>

      </div>
    </div>
  </div>
  <div class="md-overlay"></div>
  <script>
    var joinedJpIds = "";
    var gameCode = "pgsoft_slot";
    function showGameLinks(e, name, imgSrc, gameCode, subCode) {

      $('#gamelinksModal-1 .g-title').text(name);
      $('#gamelinksModal-1 img').attr('src', imgSrc);
      $('#hiddenGameCode001').val(gameCode);
      $('#hiddenSubGameCode001').val(subCode);
      $('#gamelinksModal-1').nifty("show");
    }


    $(document).ready(function () {
      var hotGame = document.location.href.split('hot=')[1];

      if (hotGame) {
        hotGame = decodeURI(hotGame).replace(/\-/g, ' '); //hotGame.replace(/\+/g, ' ');
        console.log('hot', hotGame);
        var exp = new RegExp(hotGame.toLowerCase());
        $('.game-box').each(function() {
          var isMatch = exp.test(((typeof $(this).data('title') == 'string') ? $(this).data('title').toLowerCase(): $(this).data('title')));

          if (isMatch) {
            $(this).trigger('click');
            return false;
          }
        });
      }

      /*search*/
      $('.search').keyup(function() {

        var value = $(this).val().toLowerCase();
        var exp = new RegExp(value);
        $('.game-box').each(function() {
          var isMatch = exp.test(((typeof $(this).find('h5').data('title') == 'string') ? $(this).find('h5').data('title').toLowerCase(): $(this).find('h5').data('title')));
          $(this).toggle(isMatch);
        });
      });
      $('.srch_button').click(function() {
        $('.search').val("");
        $('.search').trigger("keyup");
      });
      /*search end*/


      $('.sub-games .filter .top').addClass('active');

      function filterGameBoxes(self) {

        $('.sub-games .filter .btn').removeClass('active');
        $(self).addClass('active');
        var filterType = $(self).data('filter');

        $('.sub-games .game-box').hide();
        $('.sub-games .game-box').filter(function() {
          return $(this).data("filter").indexOf(filterType) >= 0;
        }).show();

      }


      //Default to Top Games :
      if (gameCode === 'pgsoft_slot') {
        filterGameBoxes($('.sub-games .filter .btn[data-filter=TOP]')[0]);
      } else {
        filterGameBoxes($('.sub-games .filter .btn[data-filter=ALL]')[0]);
      }

      //Add filter btn event listen
      $('.sub-games .filter .btn.f').click(function() {

        filterGameBoxes(this);
      })

      $('#btnApplyFilter_01').click(function() {

        var selFilter = $('input[name="rdFilterSubGames"]:checked').val();
        var e = $('#btnFilters_003')[0];
        $(e).data('filter', selFilter);
        filterGameBoxes(e);
        $('#filterModal-2').nifty('hide');


      })


      if (joinedJpIds) {
        var url = "https://jpn-ticker-gcp-str.hep200512.com/v1/ticker?currency="+window.currencyCode +"&jackpotIds=" + joinedJpIds;


        if ($.ajaxSettings && $.ajaxSettings.headers) {
          delete $.ajaxSettings.headers["X-CSRF-TOKEN"];
          // console.log("remove X-CSRF-TOKEN header");
          // alert("remove X-CSRF-TOKEN header");
        }
        $.ajax({
          url: url,
          type: 'GET',
          dataType: 'json',
          headers: {},
          beforeSend: function(jqXHR, settings) {}
        })
        .done(function(data) {
          if (data && data.length > 0) {
            //console.log(data);
            for (let i = 0; i < data.length; i++) {
              var jp = data[i];
              if (jp.jackpotId && jp.pools) {
                var pool = jp.pools;
                for (var key in pool) {
                  if (pool.hasOwnProperty(key)) {
                    var amt = pool[key].amount;

                    if (amt > 0) {
                      // console.log(amt);

                      amt = amt.toString()
                      $('[data-jpid="'+ jp.jackpotId +'"]').find('.amount_box').text(window.currencyCode +' ' +window.formatNumber(amt)).show();

                      $('[data-jpid="'+ jp.jackpotId +'"]').find('.amount_box').each(function () {
                        $(this).prop('Counter', 0).animate({
                          Counter: amt
                        }, {
                          duration: 7000,
                          step: function (func) {
                            $(this).text(window.currencyCode +' ' +window.formatNumber(func.toString()));
                          }
                        });
                      });
                    }
                  }
                  break;
                }
              }

            }


          }



        });
        if ($.ajaxSettings && $.ajaxSettings.headers) {

          $.ajaxSettings.headers["X-CSRF-TOKEN"] = $('meta[name="csrf-token"]').attr('content');
          // console.log("add back X-CSRF-TOKEN  header");
          // alert("add back X-CSRF-TOKEN header");
        }
      }

    });
  </script>

  <div class="mobilesite-footer">
    <div class="container">
      <style media="screen">
        .left-custom-livechat-code {
          bottom: 58px !important;
        }
        #chat-widget-container {
          bottom: 51px !important;
        }
      </style>


      <script type="text/javascript">
        $(".togglemenu-trigger").click(function() {
          var currentToggle = $(this).attr("data-showID");
          if ($(currentToggle).hasClass("show")) {
            $(currentToggle).removeClass("show");
          } else {
            $(".togglemenu-content").removeClass("show");
            $(currentToggle).addClass("show");
          }

        });
      </script>
    </div>
  </div>
</div>
@endsection