import {post} from "../utils/Request.js";
import {notify} from "../utils/Notiflix.js";

const contact = () => {
    const contactForm=document.getElementById("contactForm")

    contactForm.addEventListener("submit",(ev)=>{
        ev.preventDefault()
        const data=new FormData(contactForm)

        post("api/SendMail",data).then(result=>{
            notify(result?.conclusion, result?.message)
        })
    })
}

export default contact