<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="{{ url('web') }}/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<script src="{{ url('web') }}/js/anime.min.js"></script>
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
<script src="{{ url('web') }}/js/owl.carousel.min.js"></script>
<script src="{{ url('web') }}/js/lightgallery.min.js"></script>



<script src="{{ url('web') }}/js/custom.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-validation@1.19.5/dist/jquery.validate.min.js"></script>
@if (app()->getLocale() == 'ar')
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.2/localization/messages_ar.min.js"></script>
@endif

<script>
    var bodyStyles = document.body.style;

    bodyStyles.setProperty('--color-background', "{{ getSetting('main_first_color') }}");
    bodyStyles.setProperty('--default_main_second_color', "{{ getSetting('main_second_color') }}");
    bodyStyles.setProperty('--default_main_third_color', "{{ getSetting('main_third_color') }}");
    bodyStyles.setProperty('--default_main_six_color', "{{ getSetting('main_six_color') }}");
    bodyStyles.setProperty('--color_header', "{{ getSetting('color_header') }}");
</script>

@stack('js')

{{-- Sweet Alerts Start --}}
@if(session()->has('success'))
<script>
    const Toast = Swal.mixin({
        toast: true,
        position: 'top-start',
        showConfirmButton: false,
        timer: 4000,
        timerProgressBar: true,
        didOpen: (toast) => {
            toast.addEventListener('mouseenter', Swal.stopTimer)
            toast.addEventListener('mouseleave', Swal.resumeTimer)
        }
    })

    Toast.fire({
        icon: 'success',
        title: "{{ session()->get('success') }}"
    })
</script>
@endif

@if(session()->has('error'))
<script>
    const Toast = Swal.mixin({
        toast: true,
        position: 'top-start',
        showConfirmButton: false,
        timer: 4000,
        timerProgressBar: true,
        didOpen: (toast) => {
            toast.addEventListener('mouseenter', Swal.stopTimer)
            toast.addEventListener('mouseleave', Swal.resumeTimer)
        }
    })

    Toast.fire({
        icon: 'error',
        title: "{{ session()->get('error') }}"
    })
</script>
@endif