        <div class="row d-flex justify-content-center ">
            <p></p>
                <div class="wpcf7 js" id="wpcf7-f18-p19-o1" lang="pt-BR" dir="ltr">
                    <div class="screen-reader-response"><p role="status" aria-live="polite" aria-atomic="true"></p> <ul></ul></div>
                    <form data-form-contato method="post" class="wpcf7-form init" aria-label="Formulários de contato" novalidate="novalidate" data-status="init">
                        <p>
                            <label> Seu nome (obrigatório) </label><br>
                            <span class="wpcf7-form-control-wrap" data-name="your-name">
                                <input size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" value="" type="text" name="Nome">
                            </span>
                        </p>
                        <p>
                            <label> Seu e-mail (obrigatório)</label><br>
                            <span class="wpcf7-form-control-wrap" data-name="your-email">
                                <input size="40" class="wpcf7-form-control wpcf7-email wpcf7-validates-as-required wpcf7-text wpcf7-validates-as-email" aria-required="true" aria-invalid="false" value="" type="email" name="Email">
                            </span>
                        </p>
                        <p>
                            <label> Assunto</label><br>
                            <span class="wpcf7-form-control-wrap" data-name="your-subject">
                                <input size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" value="" type="text" name="Assunto">
                            </span>
                        </p>
                        <p><label> Sua mensagem</label><br>
                            <span class="wpcf7-form-control-wrap" data-name="your-message">
                                <textarea cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea" aria-invalid="false" name="Mensagem"></textarea>
                            </span>
                        </p>
                        <p><input type="submit" value="Enviar" class="wpcf7-form-control wpcf7-submit"><span class="ajax-loader"></span></p>
                        
                        <div data-div-feedback class="alert" role="alert" style="display: none;"></div>
                    </form>
                </div>
            <p></p>  
        </div>

		<script>
			const formContato = document.querySelector('[data-form-contato]'),
				divFeedback = document.querySelector('[data-div-feedback]');

			const clearFeedback = () => {
				divFeedback.textContent = '';
				divFeedback.classList.remove('alert-success', 'alert-danger');
				divFeedback.style.display = 'none';
			}

			const clearForm = () => {
				formContato.querySelectorAll('input, textarea')
					.forEach(input => (input.value !== 'Enviar') && (input.value = ''));
			}

			formContato.querySelectorAll('input, textarea')
				.forEach(input => input.addEventListener('input', e => {
					input.closest('div').querySelector('.error').style.display = input.value === '' ? 'block' : 'none'
				}));

			formContato.addEventListener('submit', e => {
				e.stopPropagation();
				e.preventDefault();

				formContato.querySelectorAll('input, textarea').forEach(input => 
						(input.value !== 'Enviar') && (input.closest('div').querySelector('.error')) && (input.closest('div').querySelector('.error').style.display = input.value === '' ? 'block' : 'none')
					);

				clearFeedback();
				if (formContato.querySelectorAll('.error[display="block"]').length === 0) {
					fetch('https://www.uninter.com/pesquisa/wp-content/themes/pesquisa2024/application/send-email.php', {
						method:'post', body: new FormData(formContato)
					}).then((resp) => resp.json())
					.then(response => {
						console.log(response);
						
						divFeedback.classList.remove('alert-success', 'alert-danger');
						divFeedback.classList.add(`alert-${response.success ? 'success' : 'danger'}`);
						divFeedback.textContent = response.msg;
						divFeedback.style.display = 'block';

						if (response.success) clearForm();

						setTimeout(() => clearFeedback(), 5000);
					})
					.catch(error => console.log(error))
					.finally(() => {
						// btnEnviarMensagem.style.display = 'inline-block';
					});
				} 
			})
		</script>
	{"id":19,"date":"2017-12-14T11:03:22","date_gmt":"2017-12-14T13:03:22","guid":{"rendered":"https:\/\/www.uninter.com\/pesquisa-\/?page_id=19"},"modified":"2024-08-13T14:09:52","modified_gmt":"2024-08-13T17:09:52","slug":"contato","status":"publish","type":"page","link":"https:\/\/www.uninter.com\/pesquisa\/contato\/","title":{"rendered":"Contato"},"content":{"rendered":"\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-faleconosco.php","meta":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.uninter.com\/pesquisa\/wp-json\/wp\/v2\/pages\/19"}],"collection":[{"href":"https:\/\/www.uninter.com\/pesquisa\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.uninter.com\/pesquisa\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.uninter.com\/pesquisa\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.uninter.com\/pesquisa\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":11,"href":"https:\/\/www.uninter.com\/pesquisa\/wp-json\/wp\/v2\/pages\/19\/revisions"}],"predecessor-version":[{"id":2640,"href":"https:\/\/www.uninter.com\/pesquisa\/wp-json\/wp\/v2\/pages\/19\/revisions\/2640"}],"wp:attachment":[{"href":"https:\/\/www.uninter.com\/pesquisa\/wp-json\/wp\/v2\/media?parent=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}