<?php
    $providerItems = $embedProviders ?? [];
    $serverQuery = request()->query();
?>

<section class="server-switcher" aria-label="Streaming server options">
    <span class="server-switcher-label">Choose server</span>
    <div class="server-switcher-buttons">
        <?php $__empty_1 = true; $__currentLoopData = $providerItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $providerKey => $provider): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <?php
                $query = array_merge($serverQuery, ['server' => $providerKey]);
                $serverUrl = request()->url() . '?' . http_build_query($query);
            ?>
            <?php
                $isActiveServer = ($selectedServer ?? null) === $providerKey;
            ?>
            <a
                href="<?php echo e($serverUrl); ?>"
                class="server-button server-<?php echo e($providerKey); ?> <?php echo e($isActiveServer ? 'is-active' : ''); ?>"
                <?php if($isActiveServer): ?> aria-current="true" <?php endif; ?>
            >
                <span class="server-button-name"><?php echo e($provider['name']); ?></span>
                <?php if($isActiveServer): ?>
                    <span class="server-selected-badge" aria-hidden="true">✓ Selected</span>
                <?php endif; ?>
            </a>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <span class="server-button is-disabled">No server configured</span>
        <?php endif; ?>
    </div>
</section>
<?php /**PATH /home/megashopltd/moviedocks.com/resources/views/front/partials/server-switcher.blade.php ENDPATH**/ ?>