<!DOCTYPE html>
<html class="gameBrandPage custom-scroll" xmlns="http://www.w3.org/1999/xhtml" lang="id">
<head>
    <title>GameLobby - <?php echo e($pageTitle); ?></title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    
    <link href="<?php echo e(asset('assets/css/bootstrap.min.css')); ?>" rel="preload" as="style" type="text/css" />
    <link href="<?php echo e(asset('assets/css/bootstrap-theme.min.css')); ?>" rel="preload" as="style" type="text/css" />
    <link href="<?php echo e(asset('assets/css/styles.css')); ?>?v=5" rel="preload" as="style" type="text/css" />
    <link href="<?php echo e(asset('assets/css/theme/mobile/mobile.css')); ?>?v=4" rel="preload" as="style" type="text/css" />
    <link href="<?php echo e(asset('assets/css/theme/mobile/blackgold.css')); ?>?v=7" rel="preload" as="style" type="text/css" />
    <link href="<?php echo e(asset('assets/custom/css/theme/mobile/custom_style.css')); ?>?v=4" rel="preload" as="style" type="text/css" />
    <link href="<?php echo e(asset('assets/custom/css/theme/mobile/custom_color.css')); ?>?v=1" rel="preload" as="style" type="text/css" />
</head>
<body class="gameBrandPage master-main mainContent maincontent-design2">
    
    <div class="gameBrandPage-inner-container">
        <div class="row-inner">
            <div class="gameBrandHeader game-title-header">
                <h4 class="game-title"><?php echo e($pageTitle); ?></h4>
                
                <div class="searchGame">
                    <div class="input-form-group search-form">
                        <input type="text" id="inputSearchGame" class="form-control" placeholder="Search" onkeypress="return event.keyCode !== 13;" />
                        <button id="btnsearchgame" class="btn btn-default btn-md" type="button" style="height: 34px;"><span class="glyphicon glyphicon-search"></span></button>
                    </div>
                </div>
                
            </div>
            <div id="gameBrandGames" style="min-height: 750px; position: relative">
                <div class="loader loader-d-n" style="display: none;">
                    <img src="<?php echo e(asset('assets/images/loading.gif')); ?>" alt="loading" />
                </div>
                <div class="gameBrand gameprovider-menu">
                    
                    <?php $__empty_1 = true; $__currentLoopData = $providers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $provider): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <div class="gameprovider-d-min-2 gameContainer gameprovider-item">
                        <div class="gameContent" data-maintenance="0" data-link="<?php echo e($provider->slug); ?>" data-opentype="1" data-name="<?php echo e($provider->provider_name); ?>">
                            <div class="tnhover"><span class="glyphicon glyphicon-play"></span>&nbsp;&nbsp;Play</div>
                            <div class="tncontent gameprovider-content">
                                
                                <img class="img-responsive img-center layer-1" src="<?php echo e(asset('assets/brand/game/2/Color_Gold_ID.webp')); ?>?v=2" />
                                
                                <img class="img-responsive img-center layer-2" alt="<?php echo e($provider->provider_name); ?>" title="<?php echo e($provider->provider_name); ?>" src="<?php echo e(asset($provider->icon)); ?>" />
                                
                            </div>
                            
                            <?php if(!empty($provider->badge)): ?>
                            <div class="newProviderIcon provider-description animate-provider-icon ">
                                <div class="newProviderIconArrow provider-arrow"></div>
                                <?php echo e($provider->badge); ?>

                            </div>
                            <?php endif; ?>
                            
                        </div>
                    </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <div style="width: 100%; text-align: center; color: #fff; padding: 20px;">
                        Belum ada provider yang tersedia saat ini.
                    </div>
                    <?php endif; ?>
                    
                </div>
            </div>
        </div>
    </div>

    <link href="<?php echo e(asset('assets/css/bootstrap.min.css')); ?>" rel="stylesheet" type="text/css" />
    <link href="<?php echo e(asset('assets/css/bootstrap-theme.min.css')); ?>" rel="stylesheet" type="text/css" />
    <link href="<?php echo e(asset('assets/css/styles.css')); ?>?v=5" rel="stylesheet" type="text/css" />
    <link href="<?php echo e(asset('assets/css/theme/mobile/mobile.css')); ?>?v=4" rel="stylesheet" type="text/css" />
    <link href="<?php echo e(asset('assets/css/theme/mobile/blackgold.css')); ?>?v=7" rel="stylesheet" type="text/css" />
    <link href="<?php echo e(asset('assets/custom/css/theme/mobile/custom_style.css')); ?>?v=4" rel="stylesheet" type="text/css" />
    <link href="<?php echo e(asset('assets/custom/css/theme/mobile/custom_color.css')); ?>?v=1" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="<?php echo e(asset('assets/js/jquery-1.11.3.min.js')); ?>"></script>
    <script type="text/javascript" src="<?php echo e(asset('assets/js/bootstrap.min.js')); ?>"></script>
    <script type="text/javascript" src="<?php echo e(asset('assets/js/jquery.visible.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/js/ie10-viewport-bug-workaround.js')); ?>"></script>
    
    <script type="text/javascript">
        var openPrevGameID = "";
        var resetOpenGame = null;
        
        $(".gameContent").mouseenter(function () {
            if ($(this).data("maintenance") == 1) return;
            $(this).find(".tnhover").fadeIn(200);
        }).mouseleave(function () {
            if ($(this).data("maintenance") == 1) return;
            $(this).find(".tnhover").fadeOut(200);
        }).click(function () {
            if ($(this).data("maintenance") == 1) {
                alert('Saat ini game sedang dalam pemeliharaan. Sila coba lagi nanti');
                return;
            }
            if ($(this).data("state") == 0) return;
            var clickDataLink = $(this).data('link');
            if (clickDataLink == openPrevGameID && (clickDataLink != null && clickDataLink != "")) return false;
            clearTimeout(resetOpenGame);
            resetOpenGame = setTimeout(function () { openPrevGameID = ""; }, 2000);
            openPrevGameID = (clickDataLink === null || clickDataLink === undefined) ? "" : clickDataLink;
            var openType = $(this).data("opentype");

            if (openType == 5 || openType == 4 || openType == 3 || openType == 2) {
                // Logika buka pop-up/window baru (tetap dipertahankan)
                var name = $(this).data("name");
                var wWidth = 800; var wHeight = 600; // default
                var win = window.open("/mobile/account/gamepage?gt=1&gg=" + $(this).data("link"), name, 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + wWidth + ',height=' + wHeight, "opengame");
                if(win) win.document.title = name;
            } else {
                // LOGIKA REDIRECT DIUBAH DI SINI
                // Mengambil nilai 'gc' (kategori game, misal: slot) dari URL saat ini
                var currentGc = "<?php echo e(request('gc')); ?>";
                var targetGg = $(this).data("link"); // Mengambil nama provider (misal: pragmatic)
                
                // Menyusun URL target gabungan
                var targetUrl = "/mobile/account/games/" + currentGc + "?gc=" + currentGc + "&gg=" + targetGg;

                if (self !== top) {
                    // Jika file ini dipanggil di dalam iframe, pindahkan Parent Window-nya!
                    window.parent.location.href = targetUrl;
                } else {
                    // Jika diakses langsung tanpa iframe
                    window.location.href = targetUrl;
                }
            }
        });

        $(window).scroll(function () {
            loadVisibleImage(false);
        });

        // Script Pencarian Instan Client-side
        $("#inputSearchGame").on("keyup input", function () {
            $('.loader').hide(); 
            var searchValue = $(this).val().toLowerCase();

            $(".gameprovider-item").each(function () {
                var providerName = $(this).find(".gameContent").data("name").toLowerCase();
                
                if (providerName.indexOf(searchValue) > -1) {
                    $(this).show();
                } else {
                    $(this).hide();
                }
            });

            loadVisibleImage(false);
        });

        function loadVisibleImage(isReset) {
            $(".tnimg img:visible").each(function (i, obj) {
                if (isReset) $(obj).parent().removeAttr("data-show");
                if ($(obj).attr("data-tnsrc")) {
                    if ($(obj).visible(true)) {
                        $(obj).parent().attr("data-show", "1");
                        $(obj).parent().hide();
                        $(obj).attr("src", $(obj).data("tnsrc"));
                        $(obj).removeAttr("data-tnsrc");
                        $(obj).on('load', function () {
                            $(obj).parent().fadeIn(400);
                        });
                    }
                } else {
                    if ($(obj).visible(true)) {
                        if (!$(obj).parent().attr('data-show')) {
                            $(obj).parent().attr("data-show", "1");
                            $(obj).parent().hide();
                            $(obj).parent().fadeIn(400);
                        }
                    }
                }
            });
        }
    </script>
</body>
</html><?php /**PATH /www/wwwroot/website/sewa/dragon158/resources/views/frontend/mobile/pages/account/brand/index.blade.php ENDPATH**/ ?>