"use strict";exports.id=2112,exports.ids=[2112],exports.modules={32112:(e,r,t)=>{t.d(r,{sendEmail:()=>o});var s=t(27745);async function o(e){let r=process.env.SENDGRID_API_KEY;if(!r)return console.warn("[Email] SendGrid API key not configured, skipping email"),{success:!0};try{let t=await fetch("https://api.sendgrid.com/v3/mail/send",{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify({personalizations:[{to:[{email:e.to}]}],from:{email:e.from||"noreply@wasiyyahvault.com",name:"Wasiyat"},subject:e.subject,content:[{type:"text/html",value:e.html}]})});if(!t.ok){let e=await t.text();return console.error("[Email] SendGrid error:",e),{success:!1,error:"Failed to send email"}}return{success:!0}}catch(e){return console.error("[Email] Send error:",e),{success:!1,error:"Failed to send email"}}}t(26461),(0,t(85723).h)([o]),(0,s.j)("e165272ae67bff6ca4d3fa921efcee20f16b9146",o)}};