import{o as e,t}from"./utils-Dac180Gn.js";import{t as n}from"./file-code-corner-0dH6LMmw.js";import{$a as r,Ba as i,Ga as a,Ja as o,Ka as s,Mo as c,No as l,Po as u,Ra as d,To as f,fo as p,qa as m,ra as h}from"./index-8M5AnKdQ.js";var g=e(),_=[{label:`Administration`,items:[{title:`Users`,url:`/settings/users`,icon:d,entity:`user_management`},{title:`Roles`,url:`/settings/roles`,icon:a,entity:`user_management`},{title:`Data Permissions`,url:`/settings/data-permissions`,icon:s,entity:`data_permissions`},{title:`Assignees`,url:`/settings/assignees`,icon:i,entity:`assignees`}]},{label:`Import / Export`,items:[{title:`Import / Export`,url:`/settings/import-export`,icon:p,entity:`import_export`}]},{label:`Settings`,items:[{title:`Company Config`,url:`/settings/company-config`,icon:f,entity:`company_config`},{title:`Code Templates`,url:`/settings/code-templates`,icon:n,entity:`code_templates`},{title:`Spec Config`,url:`/settings/spec-config`,icon:o},{title:`Print Templates`,url:`/settings/print-templates`,icon:r,entity:`print_templates`},{title:`Profile`,url:`/settings/profile`,icon:m}]}];function v(){let e=u(),{user:n,hasEntityAccess:r}=h();function i(e){return!e.entity||n?.is_superuser||n?.is_staff?!0:r(e.entity)}let a=e.pathname===`/settings`;return(0,g.jsxs)(`div`,{className:`flex h-[calc(100vh-3.5rem)]`,children:[(0,g.jsx)(`nav`,{className:`w-56 shrink-0 border-r bg-muted/30 overflow-y-auto py-4 px-3 space-y-5`,children:_.map(n=>{let r=n.items.filter(i);return r.length===0?null:(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`h3`,{className:`text-[10px] font-bold uppercase tracking-widest text-[#1a3c6e] dark:text-[#4a7ab5] mb-2 px-2`,children:n.label}),(0,g.jsx)(`ul`,{className:`space-y-0.5`,children:r.map(n=>{let r=e.pathname===n.url;return(0,g.jsx)(`li`,{children:(0,g.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,g.jsx)(n.icon,{className:`size-4 shrink-0`}),n.title]})},n.url)})})]},n.label)})}),(0,g.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:a?(0,g.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,g.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,g.jsx)(m,{className:`size-12 text-muted-foreground/40 mx-auto`}),(0,g.jsx)(`h2`,{className:`text-lg font-semibold text-muted-foreground`,children:`Welcome To Admin Settings`}),(0,g.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Please Click On Menu`})]})}):(0,g.jsx)(l,{})})]})}export{v as default};