module.exports=[451569,a=>{"use strict";let b={"products.view":["SUPER_ADMIN","MODERATOR"],"products.create":["SUPER_ADMIN"],"products.edit":["SUPER_ADMIN","MODERATOR"],"products.delete":["SUPER_ADMIN"],"blog.view":["SUPER_ADMIN","BLOG_EDITOR","MODERATOR"],"blog.create":["SUPER_ADMIN","BLOG_EDITOR"],"blog.edit":["SUPER_ADMIN","BLOG_EDITOR","MODERATOR"],"blog.publish":["SUPER_ADMIN","BLOG_EDITOR"],"blog.delete":["SUPER_ADMIN"],"team.view":["SUPER_ADMIN"],"team.manage":["SUPER_ADMIN"],"jobs.view":["SUPER_ADMIN","HR_MANAGER"],"jobs.manage":["SUPER_ADMIN","HR_MANAGER"],"inquiries.view":["SUPER_ADMIN","SUPPORT_AGENT","MODERATOR"],"inquiries.manage":["SUPER_ADMIN","SUPPORT_AGENT"],"tickets.view":["SUPER_ADMIN","SUPPORT_AGENT"],"tickets.manage":["SUPER_ADMIN","SUPPORT_AGENT"],"tickets.assign":["SUPER_ADMIN"],"leads.view":["SUPER_ADMIN","SUPPORT_AGENT"],"leads.manage":["SUPER_ADMIN","SUPPORT_AGENT"],"users.view":["SUPER_ADMIN"],"users.manage":["SUPER_ADMIN"],"services.view":["SUPER_ADMIN","MODERATOR"],"services.create":["SUPER_ADMIN"],"services.edit":["SUPER_ADMIN","MODERATOR"],"services.delete":["SUPER_ADMIN"],"pages.view":["SUPER_ADMIN","MODERATOR"],"pages.create":["SUPER_ADMIN"],"pages.edit":["SUPER_ADMIN","MODERATOR"],"pages.delete":["SUPER_ADMIN"],"publications.view":["SUPER_ADMIN","BLOG_EDITOR","MODERATOR"],"publications.create":["SUPER_ADMIN","BLOG_EDITOR"],"publications.edit":["SUPER_ADMIN","BLOG_EDITOR","MODERATOR"],"publications.delete":["SUPER_ADMIN"],"outlets.view":["SUPER_ADMIN","MODERATOR"],"outlets.create":["SUPER_ADMIN"],"outlets.edit":["SUPER_ADMIN","MODERATOR"],"outlets.delete":["SUPER_ADMIN"],"settings.view":["SUPER_ADMIN"],"settings.edit":["SUPER_ADMIN"],"sops.view":["SUPER_ADMIN","BLOG_EDITOR","HR_MANAGER","MODERATOR","SUPPORT_AGENT"],"sops.create":["SUPER_ADMIN","MODERATOR"],"sops.edit":["SUPER_ADMIN","MODERATOR"],"sops.approve":["SUPER_ADMIN"],"sops.delete":["SUPER_ADMIN"],"sop-categories.view":["SUPER_ADMIN","MODERATOR"],"sop-categories.manage":["SUPER_ADMIN"],"media.view":["SUPER_ADMIN","MODERATOR"],"media.upload":["SUPER_ADMIN","MODERATOR"],"media.delete":["SUPER_ADMIN"]};function c(a,c){return b[c].includes(a)}a.s(["hasPermission",()=>c])},509824,a=>{"use strict";var b=a.i(53112);let c=["general","logos","backgrounds","products","marketing"],d=b.z.object({filename:b.z.string().min(1,"Filename is required"),url:b.z.string().min(1,"URL is required"),mimeType:b.z.string().min(1,"MIME type is required"),size:b.z.number().int().positive(),folder:b.z.enum(c).default("general"),alt:b.z.string().optional().nullable()}),e=b.z.object({folder:b.z.enum(c).optional(),alt:b.z.string().optional().nullable()});a.s(["mediaAssetSchema",0,d,"mediaUpdateSchema",0,e])},345275,a=>a.a(async(b,c)=>{try{var d=a.i(137936),e=a.i(118558),f=a.i(766518),g=a.i(705949),h=a.i(509824),i=a.i(713095),j=b([f,g]);async function k(a){await (0,g.requirePermission)("media.upload");let b=h.mediaAssetSchema.safeParse(a);if(!b.success)return{error:b.error.issues[0].message};let c=await f.prisma.mediaAsset.create({data:b.data});return(0,e.revalidatePath)("/admin/media"),{success:!0,asset:c}}async function l(a,b){await (0,g.requirePermission)("media.upload");let c=h.mediaUpdateSchema.safeParse(b);return c.success?(await f.prisma.mediaAsset.update({where:{id:a},data:c.data}),(0,e.revalidatePath)("/admin/media"),{success:!0}):{error:c.error.issues[0].message}}async function m(a){return await (0,g.requirePermission)("media.delete"),await f.prisma.mediaAsset.delete({where:{id:a}}),(0,e.revalidatePath)("/admin/media"),{success:!0}}[f,g]=j.then?(await j)():j,(0,i.ensureServerEntryExports)([k,l,m]),(0,d.registerServerReference)(k,"4039d97a7b72d4badf7186452817a43498ff8bc9eb",null),(0,d.registerServerReference)(l,"60e3734296eb46a72d4e75f2d444c4c656478c9925",null),(0,d.registerServerReference)(m,"40964369ba1b76a98b27f77eb328a84ed7dff348b1",null),a.s(["createMediaAsset",()=>k,"deleteMediaAsset",()=>m,"updateMediaAsset",()=>l]),c()}catch(a){c(a)}},!1),391921,a=>a.a(async(b,c)=>{try{var d=a.i(345275),e=b([d]);[d]=e.then?(await e)():e,a.s([]),c()}catch(a){c(a)}},!1),701914,a=>a.a(async(b,c)=>{try{var d=a.i(391921),e=a.i(345275),f=b([d,e]);[d,e]=f.then?(await f)():f,a.s(["4039d97a7b72d4badf7186452817a43498ff8bc9eb",()=>e.createMediaAsset]),c()}catch(a){c(a)}},!1)];

//# sourceMappingURL=_7c4a97a6._.js.map