"use strict";(()=>{var e={};e.id=499,e.ids=[499],e.modules={399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},4770:e=>{e.exports=require("crypto")},665:e=>{e.exports=require("dns")},7702:e=>{e.exports=require("events")},2048:e=>{e.exports=require("fs")},2615:e=>{e.exports=require("http")},5240:e=>{e.exports=require("https")},8216:e=>{e.exports=require("net")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},6162:e=>{e.exports=require("stream")},2452:e=>{e.exports=require("tls")},7360:e=>{e.exports=require("url")},1764:e=>{e.exports=require("util")},1568:e=>{e.exports=require("zlib")},271:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>g,patchFetch:()=>h,requestAsyncStorage:()=>u,routeModule:()=>l,serverHooks:()=>c,staticGenerationAsyncStorage:()=>x});var s={};t.r(s),t.d(s,{POST:()=>d});var o=t(9303),i=t(8716),n=t(670),p=t(7070),a=t(5245);async function d(e){try{let{name:r,phone:t}=await e.json();if(!r||!t)return p.NextResponse.json({error:"Vui l\xf2ng điền đầy đủ th\xf4ng tin"},{status:400});if(!/^(0|\+84)(3|5|7|8|9)[0-9]{8}$/.test(t.replace(/\s/g,"")))return p.NextResponse.json({error:"Số điện thoại kh\xf4ng hợp lệ"},{status:400});let s=a.createTransport({service:"gmail",auth:{user:process.env.GMAIL_USER,pass:process.env.GMAIL_APP_PASSWORD}}),o=new Date().toLocaleString("vi-VN",{dateStyle:"short",timeStyle:"short"}),i={from:process.env.GMAIL_USER,to:process.env.NOTIFICATION_EMAIL,subject:"ĐĂNG K\xdd TƯ VẤN - V_LOG MEDIA",html:`
        <div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 10px;">
          <div style="background: white; padding: 30px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);">
            <h1 style="color: #dc2626; margin-top: 0; font-size: 24px; border-bottom: 3px solid #dc2626; padding-bottom: 10px;">
              🔔 KH\xc1CH H\xc0NG MỚI ĐĂNG K\xdd TƯ VẤN
            </h1>

            <div style="background: #fef2f2; padding: 20px; border-radius: 8px; margin: 20px 0; border-left: 4px solid #dc2626;">
              <p style="margin: 10px 0; font-size: 16px;">
                <strong style="color: #dc2626;">👤 Họ t\xean:</strong>
                <span style="color: #374151;">${r}</span>
              </p>
              <p style="margin: 10px 0; font-size: 16px;">
                <strong style="color: #dc2626;">📱 Số điện thoại:</strong>
                <span style="color: #374151;">${t}</span>
              </p>
              <p style="margin: 10px 0; font-size: 16px;">
                <strong style="color: #dc2626;">🕐 Thời gian:</strong>
                <span style="color: #374151;">${o}</span>
              </p>
            </div>

            <div style="background: linear-gradient(135deg, #dc2626 0%, #f97316 100%); padding: 15px; border-radius: 8px; text-align: center; margin-top: 20px;">
              <p style="color: white; margin: 0; font-size: 18px; font-weight: bold;">
                🎯 V_LOG MEDIA
              </p>
              <p style="color: white; margin: 5px 0 0 0; font-size: 14px; opacity: 0.9;">
                Li\xean hệ ngay để chốt đơn!
              </p>
            </div>
          </div>
        </div>
      `};return await s.sendMail(i),p.NextResponse.json({message:"Đ\xe3 gửi th\xf4ng tin th\xe0nh c\xf4ng!"},{status:200})}catch(e){return console.error("Email sending error:",e),p.NextResponse.json({error:"C\xf3 lỗi xảy ra, vui l\xf2ng thử lại sau"},{status:500})}}let l=new o.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/send-email/route",pathname:"/api/send-email",filename:"route",bundlePath:"app/api/send-email/route"},resolvedPagePath:"D:\\Develop\\Home\\VlogMD\\app\\api\\send-email\\route.ts",nextConfigOutput:"",userland:s}),{requestAsyncStorage:u,staticGenerationAsyncStorage:x,serverHooks:c}=l,g="/api/send-email/route";function h(){return(0,n.patchFetch)({serverHooks:c,staticGenerationAsyncStorage:x})}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[276,770],()=>t(271));module.exports=s})();