(()=>{var e={};e.id=784,e.ids=[784],e.modules={846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9021:e=>{"use strict";e.exports=require("fs")},3873:e=>{"use strict";e.exports=require("path")},4279:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>w,routeModule:()=>c,serverHooks:()=>m,workAsyncStorage:()=>l,workUnitAsyncStorage:()=>x});var s={};t.r(s),t.d(s,{POST:()=>u});var o=t(2706),n=t(8203),a=t(5994),i=t(9187),p=t(9021),d=t(3873);async function u(e){try{let{path:r}=await e.json();if(!r)return i.NextResponse.json({error:"File path is required"},{status:400});let t=(0,p.readFileSync)(r),s=(0,d.basename)(r);return new i.NextResponse(t,{headers:{"Content-Type":r.endsWith(".png")?"image/png":"video/mp4","Content-Disposition":`attachment; filename="${s}"`}})}catch(e){return console.error("Error downloading file:",e),i.NextResponse.json({error:"Failed to download file"},{status:500})}}let c=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/system/download/route",pathname:"/api/system/download",filename:"route",bundlePath:"app/api/system/download/route"},resolvedPagePath:"/Users/saleeh/codes/appmaker/adb-web/src/app/api/system/download/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:l,workUnitAsyncStorage:x,serverHooks:m}=c;function w(){return(0,a.patchFetch)({workAsyncStorage:l,workUnitAsyncStorage:x})}},6487:()=>{},8335:()=>{}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[994,452],()=>t(4279));module.exports=s})();