<!-- jquery -->
<script src="<?php echo e(asset('public/frontend/js/jquery-3.6.0.js')); ?>"></script>
<!-- bootstrap js -->
<script src="<?php echo e(asset('public/frontend/js/bootstrap.bundle.js')); ?>"></script>
<!-- bootstrap js -->
<script src="<?php echo e(asset('public/frontend/js/swiper.js')); ?>"></script>
<!-- lightcase js-->
<script src="<?php echo e(asset('public/frontend/js/lightcase.js')); ?>"></script>
<!-- odometer js -->
<script src="<?php echo e(asset('public/frontend/js/odometer.js')); ?>"></script>
<!-- viewport js -->
<script src="<?php echo e(asset('public/frontend/js/viewport.jquery.js')); ?>"></script>
<!-- AOS js -->
<script src="<?php echo e(asset('public/frontend/js/aos.js')); ?>"></script>
<!-- smooth scroll js -->
<script src="<?php echo e(asset('public/frontend/js/smoothscroll.js')); ?>"></script>
<!-- nice select js -->
<script src="<?php echo e(asset('public/frontend/js/jquery.nice-select.js')); ?>"></script>
<!-- select2 -->
<script src="<?php echo e(asset('public/frontend/js/select2.js')); ?>"></script>

<script src="<?php echo e(asset('public/backend/library/popup/jquery.magnific-popup.js')); ?>"></script>
<!-- main -->
<script src="<?php echo e(asset('public/frontend/js/main.js')); ?>"></script>
<!-- Country code -->
<script src="<?php echo e(asset('public/frontend/js/country-code.js')); ?>"></script>
<?php
    $routeCheck =  request()->routeIs('user.login');
?>
<script>
    var routeCheck = "<?php echo e($routeCheck); ?>";
    if(routeCheck){
         // Function to update the display based on the selected login option
    function updateLoginForm() {
        const otpForm = document.getElementById('otp-login-form');
        const passwordForm = document.getElementById('password-login-area');
        const otpRadio = document.getElementById('radio-one');

        if (otpRadio.checked) {
            otpForm.style.display = 'block';
            passwordForm.style.display = 'none';
        } else {
            otpForm.style.display = 'none';
            passwordForm.style.display = 'block';
        }
    }

    // Add event listeners to the radio buttons
    document.getElementById('radio-one').addEventListener('change', updateLoginForm);
    document.getElementById('radio-two').addEventListener('change', updateLoginForm);

    // Initial call to set the correct display on page load
    updateLoginForm();
    }

</script>
<script>
    $("select[name=lang_switcher]").change(function() {
        var selected_value = $(this).val();
        var submitForm =
            `<form action="<?php echo e(route('frontend.languages.switch')); ?>" id="local_submit" method="POST"> <?php echo csrf_field(); ?> <input type="hidden" name="target" value="${$(this).val()}" ></form>`;
        $("body").append(submitForm);
        $("#local_submit").submit();
    });
</script>
<script>
    function openAlertModal(URL, target, message, actionBtnText = "Remove", method = "DELETE") {
        if (URL == "" || target == "") {
            return false;
        }

        if (message == "") {
            message = "Are you sure to delete ?";
        }
        var method = `<input type="hidden" name="_method" value="${method}">`;
        openModalByContent({
                content: `<div class="card modal-alert border-0">
                    <div class="card-body">
                        <form method="POST" action="${URL}">
                            <input type="hidden" name="_token" value="${laravelCsrf()}">
                            ${method}
                            <div class="head mb-3">
                                ${message}
                                <input type="hidden" name="target" value="${target}">
                            </div>
                            <div class="foot d-flex align-items-center justify-content-between">
                                <button type="button" class="modal-close btn btn--info btn--base"><?php echo e(__('Close')); ?></button>
                                <button type="submit" class="alert-submit-btn btn btn--base bg--danger btn-loading">${actionBtnText}</button>
                            </div>
                        </form>
                    </div>
                </div>`,
            },

        );
    }
</script>
<?php /**PATH D:\xampp\htdocs\Payload\resources\views/partials/footer-asset.blade.php ENDPATH**/ ?>