"use strict";(()=>{var e={};e.id=9736,e.ids=[9736,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")},71856:(e,t,s)=>{s.r(t),s.d(t,{originalPathname:()=>g,patchFetch:()=>h,requestAsyncStorage:()=>m,routeModule:()=>u,serverHooks:()=>l,staticGenerationAsyncStorage:()=>c});var r={};s.r(r),s.d(r,{GET:()=>d});var a=s(49303),i=s(88716),n=s(60670),o=s(87070),p=s(72331);async function d(e,{params:t}){try{let e=await p.prisma.supportTicket.findUnique({where:{id:t.id},select:{threadId:!0}});if(!e)return o.NextResponse.json({success:!1,message:"Tiket tidak ditemukan"},{status:404});let s=await p.prisma.message.findMany({where:{threadId:e.threadId},orderBy:{createdAt:"asc"}});return o.NextResponse.json({success:!0,data:s.map(e=>({id:e.id,sender_type:e.senderType,content:e.content,is_read:e.isRead,created_at:e.createdAt}))})}catch(e){return console.error("Support messages GET error:",e),o.NextResponse.json({success:!1,message:"Gagal memuat pesan"},{status:500})}}let u=new a.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/admin/support/[id]/messages/route",pathname:"/api/admin/support/[id]/messages",filename:"route",bundlePath:"app/api/admin/support/[id]/messages/route"},resolvedPagePath:"C:\\xampp\\htdocs\\Bolafest\\app\\api\\admin\\support\\[id]\\messages\\route.ts",nextConfigOutput:"standalone",userland:r}),{requestAsyncStorage:m,staticGenerationAsyncStorage:c,serverHooks:l}=u,g="/api/admin/support/[id]/messages/route";function h(){return(0,n.patchFetch)({serverHooks:l,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(71856));module.exports=r})();