(()=>{var e={};e.id=3200,e.ids=[3200],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},24429:()=>{},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30781:(e,t,r)=>{"use strict";e.exports=r(44870)},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64749:()=>{},87603:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>l,routeModule:()=>u,serverHooks:()=>d,workAsyncStorage:()=>p,workUnitAsyncStorage:()=>c});var s={};r.r(s),r.d(s,{POST:()=>i});var n=r(30781),o=r(60554),a=r(31625);async function i(e){try{let{consultationId:t,status:r}=await e.json();if(!t||!["active","completed"].includes(r))return new Response(JSON.stringify({error:"Invalid consultation ID or status"}),{status:400});let s=await fetch("http://localhost:3001/api/changestatus",{method:"POST",headers:{"Content-Type":"application/json",cookie:e.headers.get("cookie")||""},body:JSON.stringify({consultationId:t,status:r})});if(!s.ok){let e=await s.json();return new Response(JSON.stringify({error:e.error||"Failed to change status"}),{status:s.status})}let n=await s.json();return new Response(JSON.stringify(n),{status:200})}catch(e){return console.error("Error changing consultation status:",e),new Response(JSON.stringify({error:"Internal server error"}),{status:500})}}let u=new n.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/changestatus/route",pathname:"/api/changestatus",filename:"route",bundlePath:"app/api/changestatus/route"},resolvedPagePath:"/home/kencert/Desktop/Work/consultingsystem/frontend/app/api/changestatus/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:p,workUnitAsyncStorage:c,serverHooks:d}=u;function l(){return(0,a.patchFetch)({workAsyncStorage:p,workUnitAsyncStorage:c})}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[1625],()=>r(87603));module.exports=s})();