<footer class="footer">
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-6">
            Copyright <script>document.write(new Date().getFullYear())</script> © <a id="copyrightName">CPS COMPANY</a> | Made with ❤️ in India.
            </div>
            <div class="col-sm-6">
                <div class="text-sm-end d-none d-sm-block">
                    Design & Develope by CHOUDHURY PAYMENT SOLUTION PVT LTD
                </div>
            </div>
        </div>
    </div>
</footer>
<script>
    
    ajaxCalltopbar();
    setInterval(ajaxCalltopbar, 5000);
$("#helpSupport").click(function(){
        $('#helpSupportModal').modal('show');
    });
    
function capitalizeFirstLetter(string){
        return string.charAt(0).toUpperCase() + string.slice(1);
    }

    function Error_Msg(title,text,icon) {
        Swal.fire({
            title: title,
            text: text,
            icon: icon,
            confirmButtonClass: 'btn btn-primary w-xs mt-2',
            buttonsStyling: false,
            showCloseButton: true
        });
    }
    
    $(document).on('click', '.LoadWallet', function(e) {
        $("#LoadWalletModal").modal('show');
    });

    $("#admin_load_wallet_form").submit(function(e) {
        e.preventDefault();
        const fd = new FormData(this);
        $("#admin_load_wallet_btn").text('Please wait...');
        $('#admin_load_wallet_btn').prop('disabled', true);
        $.ajax({
          url: '<?php echo e(route('adminLoadWallet')); ?>',
          method: 'post',
          data: fd,
          cache: false,
          contentType: false,
          processData: false,
          dataType: 'json',
          success: function(data) {
            if(data.type=="error"){
                Error_Msg(capitalizeFirstLetter(data.type),data.message,data.type);
                $("#admin_load_wallet_btn").text('Save Changes');
                $('#admin_load_wallet_btn').prop('disabled', false);
            }else if(data.type=="success"){  
                Error_Msg("Updated","Updated Successfully!","success");
                //fetchAll();
                $("#admin_load_wallet_btn").text('Save Changes');
                $('#admin_load_wallet_btn').prop('disabled', false);
                $("#admin_load_wallet_form")[0].reset();
                $("#LoadWalletModal").modal('hide');
            }else{
                Error_Msg("Oops...","Something went wrong!","error");
                $("#admin_load_wallet_btn").text('Save Changes');
                $('#admin_load_wallet_btn').prop('disabled', false);
            }
          },
          error: function( jqXhr, textStatus, errorThrown ){
            Error_Msg("Oops...","Something went wrong!","error");
            $("#admin_load_wallet_btn").text('Save Changes');
            $('#admin_load_wallet_btn').prop('disabled', false);
         }
        });
    });

    
    function ajaxCalltopbar() {
        $.ajax({
            url: '<?php echo e(route('topbarCount')); ?>',
            method: 'post',
            data: {_token: '<?php echo e(csrf_token()); ?>'},
            success: function(data) {
                if(data.type == "success"){
                    $("#TopBarComplaintCount").text(data.data.complaint);
                    $("#TopBarPendingCount").text(data.data.pending);
                }else{
                    Error_Msg(capitalizeFirstLetter(data.type), data.message, data.type);
                }
            },
            error: function(err) {
                console.log(err);
                Error_Msg("Oops...", "Something went wrong!", "error");
            }
        });
    }


    </script>

<!-- Sweet Alerts js -->
<script src="<?php echo e(URL::asset('assets/libs/sweetalert2/sweetalert2.min.js')); ?>"></script>

<!-- Sweet alert init js-->
<script src="<?php echo e(URL::asset('assets/js/pages/sweetalerts.init.js')); ?>"></script>
<?php /**PATH /home/link/main.link.royalcode.in/resources/views/layouts/footer.blade.php ENDPATH**/ ?>