exports.id = 378;
exports.ids = [378];
exports.modules = {

/***/ 6627:
/***/ ((module) => {

// Exports
module.exports = {
	"style": {"fontFamily":"'__myFont_3711e5', '__myFont_Fallback_3711e5'"},
	"className": "__className_3711e5"
};


/***/ }),

/***/ 2378:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   Z: () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893);
/* harmony import */ var next_font_local_target_css_path_Components_ContactusForm_ContactUsForm_js_import_arguments_src_Fonts_Montserrat_Medium_ttf_variableName_myFont___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6627);
/* harmony import */ var next_font_local_target_css_path_Components_ContactusForm_ContactUsForm_js_import_arguments_src_Fonts_Montserrat_Medium_ttf_variableName_myFont___WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_font_local_target_css_path_Components_ContactusForm_ContactUsForm_js_import_arguments_src_Fonts_Montserrat_Medium_ttf_variableName_myFont___WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6689);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Input_Input__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4759);
/* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2523);
/* harmony import */ var react_toastify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3590);
/* harmony import */ var react_toastify_dist_ReactToastify_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8819);
/* harmony import */ var react_toastify_dist_ReactToastify_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_toastify_dist_ReactToastify_css__WEBPACK_IMPORTED_MODULE_4__);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([react_toastify__WEBPACK_IMPORTED_MODULE_3__]);
react_toastify__WEBPACK_IMPORTED_MODULE_3__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];








const ContactUsForm = ()=>{
    // const [message, setMessage] = useState("");
    const [fullName, setFullName] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("");
    const [bussinessEmail, setBussinessEmail] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("");
    const [phoneNumber, setPhoneNumber] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("");
    const [jobTitle, setJobTitle] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("");
    const onSubmit = async (e)=>{
        const values = {
            // message,
            fullName,
            bussinessEmail,
            phoneNumber,
            jobTitle
        };
        try {
            await (0,_lib_api__WEBPACK_IMPORTED_MODULE_5__/* .sendContactForm */ .m)(values);
            react_toastify__WEBPACK_IMPORTED_MODULE_3__.toast.success("Your message has been sent successfully!", {
                position: "top-right",
                autoClose: 2000,
                hideProgressBar: true,
                closeOnClick: true,
                pauseOnHover: true,
                draggable: true,
                progress: undefined
            });
        } catch (error) {
            console.log("error while submitting");
        }
    };
    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
        children: [
            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
                className: "container-for-contact-us-form",
                children: [
                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h2", {
                        className: "header-for-contact-us-form",
                        children: "Send us a message"
                    }),
                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
                        className: "continer-of-inputs-at-contact-us-form",
                        children: [
                            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                                className: "container-for-inputs",
                                children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_Input_Input__WEBPACK_IMPORTED_MODULE_2__/* .Input */ .I, {
                                    title: "Full Name",
                                    placeholder: "",
                                    name: "fullName",
                                    errorBorderColor: "red.300",
                                    value: fullName,
                                    onChange: (e)=>{
                                        setFullName(e.target.value);
                                    }
                                })
                            }),
                            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                                className: "container-for-inputs",
                                children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_Input_Input__WEBPACK_IMPORTED_MODULE_2__/* .Input */ .I, {
                                    title: "Bussiness Email",
                                    placeholder: "",
                                    value: bussinessEmail,
                                    onChange: (e)=>{
                                        setBussinessEmail(e.target.value);
                                    }
                                })
                            }),
                            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                                className: "container-for-inputs",
                                children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_Input_Input__WEBPACK_IMPORTED_MODULE_2__/* .Input */ .I, {
                                    title: "Phone Number",
                                    placeholder: "",
                                    value: phoneNumber,
                                    onChange: (e)=>{
                                        setPhoneNumber(e.target.value);
                                    }
                                })
                            }),
                            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
                                className: "container-for-inputs",
                                children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_Input_Input__WEBPACK_IMPORTED_MODULE_2__/* .Input */ .I, {
                                    title: "Job Title",
                                    placeholder: "",
                                    value: jobTitle,
                                    onChange: (e)=>{
                                        setJobTitle(e.target.value);
                                    }
                                })
                            }),
                            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("button", {
                                style: (next_font_local_target_css_path_Components_ContactusForm_ContactUsForm_js_import_arguments_src_Fonts_Montserrat_Medium_ttf_variableName_myFont___WEBPACK_IMPORTED_MODULE_6___default().style),
                                className: "btn-for-submit-at-contact-screen",
                                onClick: (e)=>{
                                    onSubmit(e);
                                },
                                children: "Submit"
                            }),
                            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", {
                                className: "terms-and-privacy-text-ahdjsn",
                                children: [
                                    "By submitting this form, you are agreeing to Demandscoop's",
                                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {}),
                                    " Privacy Policy and Terms of Service."
                                ]
                            })
                        ]
                    })
                ]
            }),
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(react_toastify__WEBPACK_IMPORTED_MODULE_3__.ToastContainer, {})
        ]
    });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ContactUsForm);

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ }),

/***/ 4759:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   I: () => (/* binding */ Input)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6689);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);


const Input = (props)=>{
    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
        children: [
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
                className: "title-for-input-atha",
                children: props.title
            }),
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("input", {
                className: "Input-for-contact-andother-compo",
                type: "text",
                placeholder: props.placeholder,
                value: props.message,
                onChange: props.onChange,
                onBlur: props.onBlur
            })
        ]
    });
};


/***/ }),

/***/ 2523:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   m: () => (/* binding */ sendContactForm)
/* harmony export */ });
const sendContactForm = async (data)=>fetch("/api/contact", {
        method: "POST",
        body: JSON.stringify(data),
        headers: {
            "Content-Type": "application/json",
            Accept: "application/json"
        }
    }).then((res)=>{
        if (!res.ok) throw new Error("Failed to send message");
        return res.json();
    });


/***/ }),

/***/ 8819:
/***/ (() => {



/***/ })

};
;