"use strict";(()=>{var e={};e.id=4203,e.ids=[4203,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")},84999:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>g,patchFetch:()=>h,requestAsyncStorage:()=>m,routeModule:()=>c,serverHooks:()=>v,staticGenerationAsyncStorage:()=>l});var a={};r.r(a),r.d(a,{DELETE:()=>u,PATCH:()=>d});var s=r(49303),i=r(88716),n=r(60670),o=r(87070),p=r(72331);async function d(e,{params:t}){try{let{name:r,description:a,category:s,price_points:i,price_coins:n,stock_quantity:d,display_order:u,is_active:c}=await e.json(),m={updatedAt:new Date};return void 0!==r&&(m.name=r),void 0!==a&&(m.description=a),void 0!==s&&(m.category=s),void 0!==i&&(m.pricePoints=i?parseInt(i):null),void 0!==n&&(m.priceCoins=n?parseInt(n):null),void 0!==d&&(m.stockQuantity=d?parseInt(d):null),void 0!==u&&(m.displayOrder=parseInt(u)),void 0!==c&&(m.isActive=c),await p.prisma.marketplaceItem.update({where:{id:t.id},data:m}),o.NextResponse.json({success:!0,message:"Item diperbarui"})}catch(e){return console.error("Marketplace PATCH error:",e),o.NextResponse.json({success:!1,message:"Gagal memperbarui item"},{status:500})}}async function u(e,{params:t}){try{return await p.prisma.marketplaceItem.delete({where:{id:t.id}}),o.NextResponse.json({success:!0,message:"Item dihapus"})}catch(e){return console.error("Marketplace DELETE error:",e),o.NextResponse.json({success:!1,message:"Gagal menghapus item"},{status:500})}}let c=new s.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/admin/marketplace/[id]/route",pathname:"/api/admin/marketplace/[id]",filename:"route",bundlePath:"app/api/admin/marketplace/[id]/route"},resolvedPagePath:"C:\\xampp\\htdocs\\Bolafest\\app\\api\\admin\\marketplace\\[id]\\route.ts",nextConfigOutput:"standalone",userland:a}),{requestAsyncStorage:m,staticGenerationAsyncStorage:l,serverHooks:v}=c,g="/api/admin/marketplace/[id]/route";function h(){return(0,n.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:l})}},72331:(e,t,r)=>{r.d(t,{prisma:()=>s});var a=r(53524);let s=globalThis.prisma??new a.PrismaClient({log:["error"]})}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[9276,5972],()=>r(84999));module.exports=a})();