(()=>{var e={};e.id=43,e.ids=[43],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")},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")},66623:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>x,routeModule:()=>p,serverHooks:()=>l,workAsyncStorage:()=>c,workUnitAsyncStorage:()=>u});var s={};t.r(s),t.d(s,{POST:()=>n});var i=t(96559),o=t(48088),a=t(37719),d=t(49526);async function n(e){try{let{name:r,email:t,message:s,rating:i}=await e.json();if(!i)return new Response(JSON.stringify({error:"Rating is required."}),{status:400});let o=d.createTransport({host:"smtp.office365.com",port:587,secure:!1,auth:{user:process.env.EMAIL_USER,pass:process.env.EMAIL_PASS}}),a={from:process.env.EMAIL_USER,to:process.env.FEEDBACK_RECEIVER_EMAIL,subject:`New Feedback Submission - Rating: ${i}/5`,text:`Name: ${r}
Email: ${t}
Message: ${s}
Rating: ${i}`,html:`
        <!DOCTYPE html>
        <html>
        <head>
          <meta charset="UTF-8">
          <title>New Feedback Submission</title>
          <style>
            body {
              font-family: 'Arial', sans-serif;
              line-height: 1.6;
              color: #333;
              max-width: 600px;
              margin: 0 auto;
              padding: 20px;
            }
            .header {
              background-color: #12173E;
              padding: 25px;
              text-align: center;
              border-radius: 8px 8px 0 0;
              color: white;
            }
            .header h1 {
              margin: 0;
              font-size: 24px;
            }
            .content {
              padding: 25px;
              background-color: #f9f9f9;
              border-left: 1px solid #ddd;
              border-right: 1px solid #ddd;
            }
            .footer {
              background-color: #12173E;
              padding: 15px;
              text-align: center;
              border-radius: 0 0 8px 8px;
              color: white;
              font-size: 12px;
            }
            .rating {
              display: inline-block;
              padding: 5px 15px;
              background-color: #DA4767;
              color: white;
              border-radius: 20px;
              font-weight: bold;
              margin: 10px 0;
            }
            .divider {
              border-top: 2px solid #DA4767;
              margin: 20px 0;
              opacity: 0.5;
            }
            .info-label {
              color: #12173E;
              font-weight: bold;
              margin-bottom: 5px;
              font-size: 14px;
            }
            .info-value {
              margin-bottom: 20px;
              padding: 10px;
              background-color: white;
              border-radius: 4px;
              border-left: 3px solid #DA4767;
            }
            .message-box {
              background-color: white;
              padding: 15px;
              border-radius: 4px;
              border: 1px solid #eee;
            }
            .reply-btn {
              display: inline-block;
              padding: 10px 25px;
              background-color: #DA4767;
              color: white;
              text-decoration: none;
              border-radius: 4px;
              margin-top: 15px;
              font-weight: bold;
            }
          </style>
        </head>
        <body>
          <div class="header">
            <h1>New Customer Feedback</h1>
            <div class="rating">${i}/5 ★</div>
          </div>
          
          <div class="content">
            <div class="info-label">From:</div>
            <div class="info-value">
              ${r||"Anonymous"}<br>
              ${t?`<a href="mailto:${t}">${t}</a>`:"No email provided"}
            </div>
            
            <div class="divider"></div>
            
            <div class="info-label">Message:</div>
            <div class="message-box">
              ${s?s.replace(/\n/g,"<br>"):"No message provided"}
            </div>
            
            <div class="divider"></div>
            
            <center>
              ${t?`<a href="mailto:${t}" class="reply-btn">Reply to Customer</a>`:""}
            </center>
          </div>
          
          <div class="footer">
            <p>\xa9 ${new Date().getFullYear()} Otogas. All rights reserved.</p>
            <p>This feedback was submitted through our website.</p>
          </div>
        </body>
        </html>
      `};return await o.sendMail(a),new Response(JSON.stringify({message:"Feedback submitted successfully"}),{status:200})}catch(e){return console.error("Error sending email:",e),new Response(JSON.stringify({error:"Failed to send feedback. Please try again later."}),{status:500})}}let p=new i.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/feedback/route",pathname:"/api/feedback",filename:"route",bundlePath:"app/api/feedback/route"},resolvedPagePath:"/Users/kb/Documents/dev/pro/next-website/src/app/api/feedback/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:c,workUnitAsyncStorage:u,serverHooks:l}=p;function x(){return(0,a.patchFetch)({workAsyncStorage:c,workUnitAsyncStorage:u})}},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 r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[719,167],()=>t(66623));module.exports=s})();