"use strict";(()=>{var e={};e.id=1530,e.ids=[1530,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")},56912:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>g,patchFetch:()=>A,requestAsyncStorage:()=>d,routeModule:()=>m,serverHooks:()=>v,staticGenerationAsyncStorage:()=>l});var s={};t.r(s),t.d(s,{GET:()=>c,dynamic:()=>i});var a=t(49303),o=t(88716),n=t(60670),p=t(87070),u=t(72331);let i="force-dynamic";async function c(){try{let e=await u.default.smmProduct.findMany({where:{isActive:!0},orderBy:[{category:"asc"},{price:"asc"}]}),r={};return e.forEach(e=>{r[e.category]||(r[e.category]=[]),r[e.category].push(e)}),p.NextResponse.json(r)}catch(e){return p.NextResponse.json({error:"Gagal memuat produk SMM"},{status:500})}}let m=new a.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/api/smm/products/route",pathname:"/api/smm/products",filename:"route",bundlePath:"app/api/smm/products/route"},resolvedPagePath:"C:\\Users\\akmal\\OneDrive\\Documents\\AmaneNime Topup\\amanenime-topup\\app\\api\\smm\\products\\route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:d,staticGenerationAsyncStorage:l,serverHooks:v}=m,g="/api/smm/products/route";function A(){return(0,n.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:l})}},72331:(e,r,t)=>{t.r(r),t.d(r,{default:()=>o,prisma:()=>a});var s=t(53524);let a=globalThis.prisma??new s.PrismaClient({datasources:{db:{url:(()=>{if(process.env.DATABASE_URL)return process.env.DATABASE_URL;let e=process.env.DB_USER||"root",r=process.env.DB_PASSWORD||"",t=process.env.DB_HOST||"127.0.0.1",s=process.env.DB_PORT||"3306",a=process.env.DB_NAME||"amanenime_topup";return`mysql://${e}:${r}@${t}:${s}/${a}`})()}},log:["error"]}),o=a}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8948,5972],()=>t(56912));module.exports=s})();