import{loadPageTexts as t}from"../i18n/main.min.js";import{hide_login_page as e,hide_signup_page as o}from"../main/main.min.js";import{hideFiles as n}from"../files/main.min.js";import{jCloudUIElements as c}from"../tools/main.min.js";const r=async function(){await t("/contact"),document.querySelector("#contact").classList.remove("hidden"),document.querySelector("#startpage").setAttribute("class","hidden"),window.history.pushState(null,"","/contact"),n(),document.querySelector("#home").setAttribute("class","hidden"),document.querySelector("#user-details-on-footer").style.display="none",document.querySelector("#user-details-on-footer").setAttribute("class","hidden")},a=function(){document.querySelector("#contact").classList.add("hidden")},s=async function(){const t=new URLSearchParams;t.append("email"," "),t.append("message",document.querySelector("#contact-form-textarea").value),await fetch("https://jcloud-services.ddns.net:1024/contact",{method:"POST",body:t.toString()}).then(async t=>{200===t.status&&(document.querySelector("#contact-request-number-container").classList.remove("hidden"),document.querySelector("#contact-request-number").textContent=await t.text())}).catch(t=>{c.alert(t)})};export{r as showContactForm,a as hideContactForm,s as submitContactForm};