<?php
    // 1. Panggil data dari helper floating()
    $floatings = floating();
?>

<?php $__empty_1 = true; $__currentLoopData = $floatings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $float): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
    <?php
        // JIKA ADA BANYAK ICON, KITA ATUR POSISINYA AGAR TIDAK BERTUMPUK
        // Icon pertama di bottom 100px, icon kedua di 170px, dst.
        $bottomPosition = 30 + ($index * 70); 
        
        // Sesuaikan nama kolom dengan database bosku (contoh: url dan image)
        $floatUrl = $float->url ?? $float->link ?? '#';
        $floatImg = $float->image ?? $float->icon ?? $float->banner ?? '';
        
        // Asumsi gambar disimpan di folder uploads (sesuaikan jika beda)
        $imgSrc = asset('uploads/' . $floatImg);
    ?>

    <a href="<?php echo e($floatUrl); ?>" class="apk-icon" target="_blank" style="position: fixed; left: 20px; bottom: <?php echo e($bottomPosition); ?>px; width: 60px; z-index: 99; transition: 0.3s;">
        <img src="<?php echo e($imgSrc); ?>" alt="Floating Banner" width="60" height="auto" onerror="this.src='/assets/custom/img/TelegramMantra88.png'">
    </a>

<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
    <a href="https://t.me/Gameonline_mantra88" class="apk-icon" target="_blank" style="position: fixed; left: 20px; bottom: 100px; width: 60px; z-index: 99; transition: 0.3s;">
        <img src="/assets/custom/img/TelegramMantra88.png" alt="Telegram" width="60" height="auto">
    </a>
<?php endif; ?><?php /**PATH /www/wwwroot/website/sewa/butuhjp/resources/views/frontend/partials/desktop/floating-icon.blade.php ENDPATH**/ ?>