import{s as e,t}from"./utils-BO1RPuol.js";import{t as n}from"./createLucideIcon-CRqfm-7T.js";import{t as r}from"./file-code-corner-C1lqqqR2.js";import{Ea as i,Fo as a,So as o,Xo as s,_o as c,as as l,co as u,go as d,ho as f,is as p,oo as m,rs as h,wo as g}from"./index-CsuVxiRQ.js";var _=n(`users-round`,[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]]),v=e(),y=[{label:`Administration`,items:[{title:`Users`,url:`/settings/users`,icon:m,entity:`users`},{title:`Groups`,url:`/settings/groups`,icon:_,entity:`rbac`},{title:`Data Permissions`,url:`/settings/data-permissions`,icon:f,entity:`dataperm`},{title:`Assignees`,url:`/settings/assignees`,icon:u,entity:`rbac`}]},{label:`Import / Export`,items:[{title:`Import / Export`,url:`/settings/import-export`,icon:a,entity:`core`}]},{label:`Settings`,items:[{title:`Company Config`,url:`/settings/company-config`,icon:s},{title:`Code Templates`,url:`/settings/code-templates`,icon:r,entity:`core`},{title:`Spec Config`,url:`/settings/spec-config`,icon:c},{title:`Print Templates`,url:`/settings/print-templates`,icon:o,entity:`printing`},{title:`Menu Management`,url:`/settings/menu-management`,icon:g,entity:`core`},{title:`Profile`,url:`/settings/profile`,icon:d}]}];function b(){let e=l(),{user:n,hasEntityAccess:r}=i();function a(e){return!e.entity||n?.is_superuser||n?.is_staff?!0:r(e.entity)}let o=e.pathname===`/settings`;return(0,v.jsxs)(`div`,{className:`flex h-[calc(100vh-3.5rem)]`,children:[(0,v.jsx)(`nav`,{className:`w-56 shrink-0 border-r bg-muted/30 overflow-y-auto py-4 px-3 space-y-5`,children:y.map(n=>{let r=n.items.filter(a);return r.length===0?null:(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`h3`,{className:`text-[10px] font-bold uppercase tracking-widest text-[#1a3c6e] dark:text-[#4a7ab5] mb-2 px-2`,children:n.label}),(0,v.jsx)(`ul`,{className:`space-y-0.5`,children:r.map(n=>{let r=e.pathname===n.url;return(0,v.jsx)(`li`,{children:(0,v.jsxs)(h,{to:n.url,className:t(`flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors`,r?`bg-[#1a3c6e] text-white font-medium`:`text-foreground/80 hover:bg-muted hover:text-foreground`),children:[(0,v.jsx)(n.icon,{className:`size-4 shrink-0`}),n.title]})},n.url)})})]},n.label)})}),(0,v.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:o?(0,v.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,v.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,v.jsx)(d,{className:`size-12 text-muted-foreground/40 mx-auto`}),(0,v.jsx)(`h2`,{className:`text-lg font-semibold text-muted-foreground`,children:`Welcome To Admin Settings`}),(0,v.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Please Click On Menu`})]})}):(0,v.jsx)(p,{})})]})}export{b as default};