"use strict";(()=>{var e={};e.id=386,e.ids=[386],e.modules={53524:e=>{e.exports=require("@prisma/client")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},32081:e=>{e.exports=require("child_process")},6113:e=>{e.exports=require("crypto")},9523:e=>{e.exports=require("dns")},82361:e=>{e.exports=require("events")},57147:e=>{e.exports=require("fs")},13685:e=>{e.exports=require("http")},95687:e=>{e.exports=require("https")},41808:e=>{e.exports=require("net")},22037:e=>{e.exports=require("os")},71017:e=>{e.exports=require("path")},12781:e=>{e.exports=require("stream")},24404:e=>{e.exports=require("tls")},57310:e=>{e.exports=require("url")},73837:e=>{e.exports=require("util")},59796:e=>{e.exports=require("zlib")},34665:(e,r,t)=>{t.r(r),t.d(r,{headerHooks:()=>g,originalPathname:()=>v,requestAsyncStorage:()=>m,routeModule:()=>d,serverHooks:()=>x,staticGenerationAsyncStorage:()=>q,staticGenerationBailout:()=>h});var s={};t.r(s),t.d(s,{POST:()=>c}),t(95655);var a=t(83323),o=t(54647),i=t(66886),u=t(45952),n=t(82280);let p=u.z.object({name:u.z.string().min(2,"Name is required"),email:u.z.string().email("Valid email is required"),subject:u.z.string().min(2,"Subject is required"),message:u.z.string().min(10,"Message must be at least 10 characters")});async function c(e){try{let r=await e.json(),t=p.safeParse(r);if(!t.success)return i.Z.json({error:"Invalid input",details:t.error.flatten()},{status:400});let{name:s,email:a,subject:o,message:u}=t.data;return await n.y.sendContactFormEmails({name:s,email:a,subject:o,message:u}),i.Z.json({success:!0,message:"Message sent successfully"})}catch(e){return console.error("[CONTACT_API]",e),i.Z.json({error:"Internal server error"},{status:500})}}let l=a.AppRouteRouteModule,d=new l({definition:{kind:o.x.APP_ROUTE,page:"/api/contact/route",pathname:"/api/contact",filename:"route",bundlePath:"app/api/contact/route"},resolvedPagePath:"D:\\Code\\MusaFoods_New\\musafoods\\app\\api\\contact\\route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:m,staticGenerationAsyncStorage:q,serverHooks:x,headerHooks:g,staticGenerationBailout:h}=d,v="/api/contact/route"}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[9727,3497,6886,3330,1651,2280],()=>t(34665));module.exports=s})();