import{s as e,t}from"./utils-CXcsdpX-.js";import{t as n}from"./createLucideIcon-Dyxun56z.js";import{t as r}from"./file-code-corner-CMK7AJNf.js";import{Co as i,Ea as a,Po as o,co as s,es as c,go as l,ho as u,mo as d,ns as f,oo as p,qo as m,ts as h,xo as g}from"./index-CvTTLloU.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:p,entity:`users`},{title:`Groups`,url:`/settings/groups`,icon:_,entity:`rbac`},{title:`Data Permissions`,url:`/settings/data-permissions`,icon:d,entity:`dataperm`},{title:`Assignees`,url:`/settings/assignees`,icon:s,entity:`rbac`}]},{label:`Import / Export`,items:[{title:`Import / Export`,url:`/settings/import-export`,icon:o,entity:`core`}]},{label:`Settings`,items:[{title:`Company Config`,url:`/settings/company-config`,icon:m},{title:`Code Templates`,url:`/settings/code-templates`,icon:r,entity:`core`},{title:`Spec Config`,url:`/settings/spec-config`,icon:l},{title:`Print Templates`,url:`/settings/print-templates`,icon:g,entity:`printing`},{title:`Menu Management`,url:`/settings/menu-management`,icon:i,entity:`core`},{title:`Profile`,url:`/settings/profile`,icon:u}]}];function b(){let e=f(),{user:n,hasEntityAccess:r}=a();function i(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(i);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)(c,{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)(u,{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)(h,{})})]})}export{b as default};