(()=>{var e={};e.id=6857,e.ids=[6857],e.modules={53524:e=>{"use strict";e.exports=require("@prisma/client")},55403:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external")},94749:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external")},20399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},25528:e=>{"use strict";e.exports=require("next/dist\\client\\components\\action-async-storage.external.js")},91877:e=>{"use strict";e.exports=require("next/dist\\client\\components\\request-async-storage.external.js")},25319:e=>{"use strict";e.exports=require("next/dist\\client\\components\\static-generation-async-storage.external.js")},19536:(e,s,t)=>{"use strict";t.r(s),t.d(s,{GlobalError:()=>a.a,__next_app__:()=>m,originalPathname:()=>p,pages:()=>c,routeModule:()=>g,tree:()=>l});var i=t(73137),r=t(54647),n=t(4183),a=t.n(n),o=t(71775),d={};for(let e in o)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(d[e]=()=>o[e]);t.d(s,d);let u=i.AppPageRouteModule,l=["",{children:["admin",{children:["products",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(t.bind(t,27048)),"D:\\Code\\MusaFoods_New\\musafoods\\app\\admin\\products\\[id]\\page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(t.bind(t,63114)),"D:\\Code\\MusaFoods_New\\musafoods\\app\\admin\\layout.tsx"]}]},{layout:[()=>Promise.resolve().then(t.bind(t,57922)),"D:\\Code\\MusaFoods_New\\musafoods\\app\\layout.tsx"],"not-found":[()=>Promise.resolve().then(t.bind(t,10269)),"D:\\Code\\MusaFoods_New\\musafoods\\app\\not-found.tsx"]}],c=["D:\\Code\\MusaFoods_New\\musafoods\\app\\admin\\products\\[id]\\page.tsx"],p="/admin/products/[id]/page",m={require:t,loadChunk:()=>Promise.resolve()},g=new u({definition:{kind:r.x.APP_PAGE,page:"/admin/products/[id]/page",pathname:"/admin/products/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:l}})},9506:(e,s,t)=>{Promise.resolve().then(t.bind(t,61377)),Promise.resolve().then(t.t.bind(t,42796,23))},27048:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>d,dynamic:()=>o});var i=t(48144),r=t(6465),n=t(30953),a=t(40211);let o="force-dynamic";async function d({params:e}){let[s,t]=await Promise.all([n._.product.findUnique({where:{id:e.id},include:{variants:!0}}),n._.category.findMany({orderBy:{nameEn:"asc"}})]);s||(0,r.notFound)();let o=t.map(e=>({id:e.id,nameEn:e.nameEn,slug:e.slug})),d=Array.isArray(s.gallery)?s.gallery:[],u={id:s.id,nameEn:s.nameEn,nameFr:s.nameFr,slug:s.slug||"",descriptionEn:s.descriptionEn,descriptionFr:s.descriptionFr,seoTitle:s.seoTitle||"",seoDescription:s.seoDescription||"",category:s.category,image:s.image,gallery:d,price:s.price||0,unit:s.unit,minOrder:s.minOrder,origin:s.origin,sku:s.sku||"",stockStatus:s.stockStatus||"In Stock",dimensions:s.dimensions||"",weight:s.weight||"",featured:s.featured,variants:s.variants.map(e=>({id:e.id,size:e.size,sku:e.sku}))};return i.jsx("div",{className:"p-6",children:i.jsx(a.ZP,{categories:o,initialData:u,isEditMode:!0})})}}};var s=require("../../../../webpack-runtime.js");s.C(e);var t=e=>s(s.s=e),i=s.X(0,[4650,2947,5851,7919,5272,1693,6238,5637,6042,7837,9868,6465,3195,3728,9424,8384,2065,5875,7502,7052,3842,589,6698,9225],()=>t(19536));module.exports=i})();