<?php
defined('ABSPATH') || exit('No Access!');

global $options;

$pre_loader_style = $options->get_option('pre-loader-style');
$pre_loader_style = $pre_loader_style ? $pre_loader_style : 'la-ball-scale-multiple';

if ($options->get_option('pre-loader') && strpos($_SERVER['REQUEST_URI'], 'elementor-preview') === false) {
    echo '<div id="pre-loader">';
    switch ($pre_loader_style) {
        default:
        case 'ball-scale-multiple':
            echo '<div class="la-ball-scale-multiple"><div></div><div></div><div></div></div>';
            break;
        case 'ball-beat':
            echo '<div class="la-ball-beat"><div></div><div></div><div></div></div>';
            break;
        case 'ball-circus':
            echo '<div class="la-ball-circus"><div></div><div></div><div></div><div></div><div></div></div>';
            break;
        case 'ball-elastic-dots':
            echo '<div class="la-ball-elastic-dots"><div></div><div></div><div></div><div></div><div></div></div>';
            break;
        case 'ball-clip-rotate':
            echo '<div class="la-ball-clip-rotate"><div></div></div>';
            break;
    }
    echo '</div>';
}