module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},650645,a=>{a.n(a.i(827572))},923576,a=>{a.n(a.i(104858))},517537,a=>{a.n(a.i(903363))},13718,a=>{a.n(a.i(685523))},118198,a=>{a.n(a.i(545518))},262212,a=>{a.n(a.i(866114))},438478,a=>{a.n(a.i(827478))},809369,a=>a.a(async(b,c)=>{try{var d=a.i(766518),e=b([d]);function f(){return d.prisma.sopCategory.findMany({orderBy:{sortOrder:"asc"},include:{_count:{select:{sops:!0}}}})}[d]=e.then?(await e)():e,a.s(["getSopCategories",()=>f]),c()}catch(a){c(a)}},!1),794207,a=>{"use strict";a.s(["CategoriesClient",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call CategoriesClient() from the server but CategoriesClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(sa-tools)/sa-tools/categories/_components/CategoriesClient.tsx <module evaluation>","CategoriesClient")},627837,a=>{"use strict";a.s(["CategoriesClient",()=>b]);let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call CategoriesClient() from the server but CategoriesClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(sa-tools)/sa-tools/categories/_components/CategoriesClient.tsx","CategoriesClient")},962387,a=>{"use strict";a.i(794207);var b=a.i(627837);a.n(b)},615973,a=>a.a(async(b,c)=>{try{var d=a.i(907997);a.i(570396);var e=a.i(673727),f=a.i(109307),g=a.i(451569),h=a.i(809369),i=a.i(962387),j=b([f,h]);async function k(){let a=await (0,f.auth)();a?.user||(0,e.redirect)("/admin/login");let b=a.user.role;(0,g.hasPermission)(b,"sop-categories.view")||(0,e.redirect)("/sa-tools");let c=(0,g.hasPermission)(b,"sop-categories.manage"),j=await (0,h.getSopCategories)();return(0,d.jsxs)("div",{className:"space-y-6 p-6 max-w-4xl mx-auto",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:"SOP Categories"}),(0,d.jsx)("p",{className:"text-muted-foreground text-sm mt-1",children:"Manage department categories for SOPs."})]}),(0,d.jsx)(i.CategoriesClient,{categories:j,canManage:c})]})}[f,h]=j.then?(await j)():j,a.s(["default",()=>k]),c()}catch(a){c(a)}},!1)];

//# sourceMappingURL=%5Broot-of-the-server%5D__ea79fafe._.js.map