"),$(".btn-enviar").prop("disabled",!0));const appForm=createApp({data(){return{page:!1,error:[],nome:"",email:"",tel:"",assunto:"",msg:""}},mounted(){this.page=!1},methods:{scrollTopTo(){$("html, body").animate({scrollTop:0},"slow")},sendForm(n){n.preventDefault();const u=$("#assunto-form").val(),f=$(".required.contato").valid(),t=grecaptcha.getResponse();if(f===0){this.scrollTopTo();return}if(t===""){this.abrirModal("Favor, preencha não sou o robô");return}const i={Nome:"InserirEmailContato",Recaptcha:t,Parametros:{nome:this.nome,tel:this.tel,email:this.email,assunto:this.assunto||u,msg:this.msg,to:`${ResultToPage.List[0].Guid}`}},r=new Headers;r.append("Content-Type","application/json");var e={method:"POST",headers:r,body:JSON.stringify(i),redirect:"follow"};fetch("https://frioar.com.br/api/meta/insertsendmail",e).then(n=>n.json()).then(n=>{console.log("Envio",i),console.log(n),n.HasError?(grecaptcha.reset(),this.abrirModal("ops, ocorreu um erro!")):this.resetForm()}).catch(n=>console.log("error",n))},resetForm(){$(".btn-submit").trigger("click")},abrirModal(n){$.sweetModal({content:`${n}`,icon:$.sweetModal.ICON_WARNING})}}});appForm.mount("#form-cont")