<?php $__env->startSection('body_class', 'depositpage'); ?>

<?php $__env->startSection('content'); ?>
<div class="master-main mainContent maincontent-design2 middlebackground background-design5">
    <div class="container">
        <div class="row multi">
            
            
            <div class="col-sm-3 main-sidebar">
                <div class="main-sidebar-container sidebar-design1">
                    <ul>
                        <li><a href="<?php echo e(url('/desktop/account/profile')); ?>"><span class="glyphicon glyphicon-list-alt"></span>Profil</a></li>
                        <li><a href="<?php echo e(url('/desktop/account/deposit')); ?>"><span class="glyphicon glyphicon-transfer"></span>Depo/Withdraw</a></li>
                        <li><a href="<?php echo e(url('/desktop/account/walletsummary')); ?>"><span class="glyphicon glyphicon-stats"></span>Transaksi</a></li>
                        <li><a href="<?php echo e(url('/desktop/account/memo')); ?>"><span class="glyphicon glyphicon-bell"></span>Memo</a></li>
                        <li><a href="<?php echo e(url('/desktop/account/referral')); ?>"><span class="glyphicon glyphicon-tags"></span>Referral</a></li>
                        <li><a href="<?php echo e(url('/desktop/account/promo')); ?>"><span class="glyphicon glyphicon-thumbs-up"></span>Promosi</a></li>
                        <li><a href="https://cutt.ly/rtpsuster1" target="_blank"><span class="glyphicon glyphicon-flash"></span>RTP</a></li>
                        <li><a href="<?php echo e(url('/download/apk')); ?>"><span class="glyphicon glyphicon-cloud-download"></span>APK</a></li>
                        <li><a href="javascript:;" onclick="showLiveChat();"><span class="glyphicon glyphicon-user"></span>Livechat</a></li>
                    </ul>
                </div>
            </div>
            
            
            <div class="col-xs-12 col-sm-9 tabbed main-content">
                <div class="content-inner-container referral-bonus-content">
                    
                    
                    <div class="btn-group-md">
                        <button type="button" class="btn btn-default alignbtn" onclick="clickTab('<?php echo e(url('/desktop/account/referral')); ?>')">Daftar Anggota Referral</button>
                        <button type="button" class="btn btn-default alignbtn" onclick="clickTab('<?php echo e(url('/desktop/account/referralmember')); ?>')">Anggota Referral</button>
                        <button type="button" class="btn btn-default alignbtn active">Bonus Referral</button>
                    </div>
                    
                    <h2 class="main-content-page-title">Bonus Referral</h2>
                    
                    
                    <div class="well" style="text-align: center; padding: 15px; margin-bottom: 20px;">
                        <h4 style="margin: 0; color: #f3c300;">Total Estimasi Bonus Anda:</h4>
                        <h2 style="margin: 10px 0 0 0; color: #28a745; font-weight: bold;">
                            Rp <?php echo e(number_format($totalAllBonus ?? 0, 0, ',', '.')); ?>

                        </h2>
                    </div>

                    
                    <div class="table-responsive">
                        <table class="table table-bordered resulttable">
                            <thead>
                                <tr class="table-header-st">
                                    <th style="text-align: center;">No</th>
                                    <th style="text-align: center;">Anggota (Username)</th>
                                    <th style="text-align: center;">Tanggal</th>
                                    <th style="text-align: center;">Jumlah Bonus (10%)</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__empty_1 = true; $__currentLoopData = $bonusData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $bonus): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr>
                                        <td style="text-align: center;"><?php echo e($index + 1); ?></td>
                                        <td style="text-align: center;"><?php echo e($bonus['username']); ?></td>
                                        <td style="text-align: center;"><?php echo e(date('d-m-Y', strtotime($bonus['tanggal']))); ?></td>
                                        <td style="text-align: right;">Rp <?php echo e(number_format($bonus['jumlah'], 0, ',', '.')); ?></td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr>
                                        <td colspan="4" style="text-align: center; padding: 20px; color: #aaa;">
                                            Belum ada data bonus referral. Kumpulkan lebih banyak anggota untuk mendapatkan bonus!
                                        </td>
                                    </tr>
                                <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                    
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('script'); ?>
<script type="text/javascript">
    var isClickTab = false;
    function clickTab(tab) {
        if (isClickTab) return;
        isClickTab = true;
        window.location.href = tab;
    }
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('frontend.desktop.pages.account.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/website/sewa/dragon158/resources/views/frontend/desktop/pages/account/pages/referralbonus.blade.php ENDPATH**/ ?>