(()=>{var e={};e.id=158,e.ids=[158],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79646:e=>{"use strict";e.exports=require("child_process")},55511:e=>{"use strict";e.exports=require("crypto")},14985:e=>{"use strict";e.exports=require("dns")},94735:e=>{"use strict";e.exports=require("events")},29021:e=>{"use strict";e.exports=require("fs")},81630:e=>{"use strict";e.exports=require("http")},55591:e=>{"use strict";e.exports=require("https")},91645:e=>{"use strict";e.exports=require("net")},21820:e=>{"use strict";e.exports=require("os")},33873:e=>{"use strict";e.exports=require("path")},27910:e=>{"use strict";e.exports=require("stream")},34631:e=>{"use strict";e.exports=require("tls")},79551:e=>{"use strict";e.exports=require("url")},28354:e=>{"use strict";e.exports=require("util")},74075:e=>{"use strict";e.exports=require("zlib")},80694:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>f,routeModule:()=>x,serverHooks:()=>v,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>m});var s={};t.r(s),t.d(s,{POST:()=>l});var i=t(42706),o=t(28203),a=t(45994),n=t(39187),u=t(98721);let p=()=>(0,u.oO)({host:"smtp.gmail.com",port:465,secure:!0,auth:{user:"loveisabc2025@gmail.com",pass:"yigw reje aysg wzmz"}}),c=e=>{switch(e){case"available":return"color: #166534; background: #f0fdf4; padding: 2px 8px; border-radius: 4px;";case"not_available":return"color: #991b1b; background: #fef2f2; padding: 2px 8px; border-radius: 4px;";default:return"color: #854d0e; background: #fefce8; padding: 2px 8px; border-radius: 4px;"}},d=e=>{switch(e){case"available":return"Will Attend";case"not_available":return"Cannot Attend";default:return"Uncertain"}};async function l(e){try{let{name:r,email:t,location:s,availability:i}=await e.json();if(!r||!t||!s||!i)return n.NextResponse.json({error:"Missing required fields"},{status:400});let o=p();return await o.verify(),await o.sendMail({from:'"Wedding RSVP Notification" <loveisabc2025@gmail.com>',to:"odafe41@gmail.com",subject:"New Wedding RSVP",html:`
        <h1>New RSVP Received!</h1>
        <p><strong>Name:</strong> ${r}</p>
        <p><strong>Email:</strong> ${t}</p>
        <p><strong>Location:</strong> ${s}</p>
        <p><strong>Availability:</strong> <span style="${c(i)}">${d(i)}</span></p>
      `}),n.NextResponse.json({success:!0})}catch(r){console.error("Error sending RSVP email:",r);let e=r instanceof Error?r.message:"Unknown error";return n.NextResponse.json({error:"Error sending RSVP email",details:e},{status:500})}}let x=new i.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/send-rsvp/route",pathname:"/api/send-rsvp",filename:"route",bundlePath:"app/api/send-rsvp/route"},resolvedPagePath:"C:\\Users\\od41\\Documents\\code\\paid\\loveisabc\\src\\app\\api\\send-rsvp\\route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:g,workUnitAsyncStorage:m,serverHooks:v}=x;function f(){return(0,a.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:m})}},96487:()=>{},78335:()=>{}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452,721],()=>t(80694));module.exports=s})();