"use strict";(()=>{var e={};e.id=4646,e.ids=[4646,2331],e.modules={53524:e=>{e.exports=require("@prisma/client")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},31925:(e,t,s)=>{s.r(t),s.d(t,{originalPathname:()=>g,patchFetch:()=>v,requestAsyncStorage:()=>l,routeModule:()=>d,serverHooks:()=>m,staticGenerationAsyncStorage:()=>c});var r={};s.r(r),s.d(r,{PATCH:()=>n});var a=s(49303),i=s(88716),o=s(60670),p=s(87070),u=s(72331);async function n(e,{params:t}){try{let{status:s}=await e.json();if(!["open","in_progress","resolved","closed"].includes(s))return p.NextResponse.json({success:!1,message:"Status tidak valid"},{status:400});let r={status:s,updatedAt:new Date};return("resolved"===s||"closed"===s)&&(r.resolvedAt=new Date),await u.prisma.supportTicket.update({where:{id:t.id},data:r}),p.NextResponse.json({success:!0,message:"Status tiket diperbarui"})}catch(e){return console.error("Support status PATCH error:",e),p.NextResponse.json({success:!1,message:"Gagal memperbarui status"},{status:500})}}let d=new a.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/admin/support/[id]/status/route",pathname:"/api/admin/support/[id]/status",filename:"route",bundlePath:"app/api/admin/support/[id]/status/route"},resolvedPagePath:"C:\\xampp\\htdocs\\Bolafest\\app\\api\\admin\\support\\[id]\\status\\route.ts",nextConfigOutput:"standalone",userland:r}),{requestAsyncStorage:l,staticGenerationAsyncStorage:c,serverHooks:m}=d,g="/api/admin/support/[id]/status/route";function v(){return(0,o.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:c})}},72331:(e,t,s)=>{s.d(t,{prisma:()=>a});var r=s(53524);let a=globalThis.prisma??new r.PrismaClient({log:["error"]})}};var t=require("../../../../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[9276,5972],()=>s(31925));module.exports=r})();