"use strict";(()=>{var e={};e.id=908,e.ids=[908],e.modules={145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},6249:(e,t)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},615:(e,t,r)=>{r.r(t),r.d(t,{config:()=>d,default:()=>s,routeModule:()=>f});var n={};r.r(n),r.d(n,{default:()=>u});var i=r(1802),o=r(7153),a=r(6249);function u(e,t){if("POST"!==e.method)return t.status(405).json({error:"Method not allowed"});let{email:r,password:n}=e.body;if("demo@example.com"===r&&"demo123"===n){let e=Buffer.from(JSON.stringify({email:r,exp:Date.now()+864e5})).toString("base64");return t.status(200).json({token:e,user:{id:1,email:r,name:"Demo User"}})}if(!r||!n)return t.status(400).json({error:"Email and password required"});let i=Buffer.from(JSON.stringify({email:r,exp:Date.now()+864e5})).toString("base64");return t.status(200).json({token:i,user:{id:1,email:r,name:r.split("@")[0]}})}let s=(0,a.l)(n,"default"),d=(0,a.l)(n,"config"),f=new i.PagesAPIRouteModule({definition:{kind:o.x.PAGES_API,page:"/api/auth/login",pathname:"/api/auth/login",bundlePath:"",filename:""},userland:n})},7153:(e,t)=>{var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},1802:(e,t,r)=>{e.exports=r(145)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=t(t.s=615);module.exports=r})();