(()=>{var e={};e.id=931,e.ids=[931],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:e=>{"use strict";e.exports=require("dns")},21820:e=>{"use strict";e.exports=require("os")},27910:e=>{"use strict";e.exports=require("stream")},28354:e=>{"use strict";e.exports=require("util")},29021:e=>{"use strict";e.exports=require("fs")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},34631:e=>{"use strict";e.exports=require("tls")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},50845:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>v,routeModule:()=>u,serverHooks:()=>c,workAsyncStorage:()=>l,workUnitAsyncStorage:()=>p});var s={};r.r(s),r.d(s,{POST:()=>n});var i=r(96559),o=r(48088),a=r(37719),d=r(49526);async function n(e){try{let{fullName:t,phone:r,email:s,carDetails:i,location:o,comments:a}=await e.json();if(!t||!r||!i||!o)return new Response(JSON.stringify({error:"Missing required fields"}),{status:400});let n=d.createTransport({host:"smtp.office365.com",port:587,secure:!1,requireTLS:!0,auth:{user:process.env.EMAIL_USER,pass:process.env.EMAIL_PASS}}),u={from:process.env.EMAIL_USER,to:process.env.OTOGAS_EMAIL,subject:"\uD83D\uDD25 New LPG Conversion Request",html:`
        <!DOCTYPE html>
        <html>
        <head>
          <style>
            body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; max-width: 600px; margin: 0 auto; padding: 20px; }
            .header { background-color: #2c5282; padding: 20px; text-align: center; border-radius: 8px 8px 0 0; }
            .header h1 { color: white; margin: 0; font-size: 24px; }
            .content { padding: 25px; background-color: #f7fafc; border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 8px 8px; }
            .detail-box { background: white; border-radius: 6px; padding: 15px; margin-bottom: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
            .detail-title { font-weight: 600; color: #2c5282; margin-bottom: 5px; font-size: 16px; }
            .detail-value { font-size: 15px; color: #4a5568; }
            .footer { margin-top: 25px; text-align: center; font-size: 14px; color: #718096; }
          </style>
        </head>
        <body>
          <div class="header">
            <h1>New LPG Conversion Request</h1>
          </div>
          <div class="content">
            <div class="detail-box">
              <div class="detail-title">👤 Customer Information</div>
              <div class="detail-value">${t}</div>
              <div class="detail-value">📞 ${r}</div>
              ${s?`<div class="detail-value">✉️ ${s}</div>`:""}
            </div>
            <div class="detail-box">
              <div class="detail-title">🚗 Vehicle Details</div>
              <div class="detail-value">${i}</div>
            </div>
            <div class="detail-box">
              <div class="detail-title">📍 Preferred Location</div>
              <div class="detail-value">${o}</div>
            </div>
            ${a?`
            <div class="detail-box">
              <div class="detail-title">💬 Additional Comments</div>
              <div class="detail-value">${a}</div>
            </div>
            `:""}
            <div class="footer">
              <p>This request was submitted through the website. Please respond within 24 hours.</p>
              <p>\xa9 ${new Date().getFullYear()} Proto Energy. All rights reserved.</p>
            </div>
          </div>
        </body>
        </html>
      `};return await n.sendMail(u),new Response(JSON.stringify({message:"Email sent successfully!"}),{status:200})}catch(e){return console.error("Email sending failed:",e),new Response(JSON.stringify({error:"Failed to send email."}),{status:500})}}let u=new i.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/convert/route",pathname:"/api/convert",filename:"route",bundlePath:"app/api/convert/route"},resolvedPagePath:"/Users/kb/Documents/dev/pro/next-website/src/app/api/convert/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:l,workUnitAsyncStorage:p,serverHooks:c}=u;function v(){return(0,a.patchFetch)({workAsyncStorage:l,workUnitAsyncStorage:p})}},55511:e=>{"use strict";e.exports=require("crypto")},55591:e=>{"use strict";e.exports=require("https")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:e=>{"use strict";e.exports=require("zlib")},78335:()=>{},79551:e=>{"use strict";e.exports=require("url")},79646:e=>{"use strict";e.exports=require("child_process")},81630:e=>{"use strict";e.exports=require("http")},91645:e=>{"use strict";e.exports=require("net")},94735:e=>{"use strict";e.exports=require("events")},96487:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[719,167],()=>r(50845));module.exports=s})();