1import{Q as c,j as e,L as s}from"./index-cP4L_Hak.js";const h=()=>{const{user:o,logout:i}=c(),n=()=>{i()},d=[{id:"tender",icon:"ð",label:"Tenders",desc:"Manage tender documents, deadlines & archives",path:"/admin/tender",color:"#0b518e",roles:["superadmin","tender_admin"]},{id:"jobs",icon:"ð¼",label:"Job Advertisements",desc:"Post and manage recruitment & job openings",path:"/admin/jobs",color:"#1a7a4a",roles:["superadmin","jobs_admin"]},{id:"news",icon:"ð°",label:"News & Events",desc:"Publish news articles and upcoming events",path:"/admin/news-manager",color:"#7c3aed",roles:["superadmin","news_admin","dept_admin"]},{id:"calendar",icon:"ðï¸",label:"Institute Calendar",desc:"Manage academic dates, examinations and holidays",path:"/admin/calendar",color:"#0f766e",roles:["superadmin","calendar_admin","admission_admin"]},{id:"departments",icon:"ðï¸",label:"Departments",desc:"Manage department pages and information",path:"/admin/departments",color:"#c2410c",roles:["superadmin"]},{id:"committees",icon:"ð¢",label:"Committees",desc:"Manage committee records and page links",path:"/admin/committees",color:"#0f766e",roles:["superadmin"]},{id:"committee-profiles",icon:"ð¥",label:"Committee Profiles",desc:"Add and manage committee member profiles",path:"/admin/committee-profiles",color:"#0369a1",roles:["superadmin"]},{id:"faculty",icon:"ð¨âð«",label:"Faculty Profiles",desc:"Add, edit and manage faculty member profiles",path:"/admin/faculty",color:"#0369a1",roles:["superadmin","dept_admin"]},{id:"staff",icon:"ð¤",label:"Staff Profiles",desc:"Manage non-teaching staff records",path:"/admin/staff",color:"#0f766e",roles:["superadmin","dept_admin"]},{id:"admissions",icon:"ð",label:"Admissions",desc:"Handle admission notices and fee structures",path:"/admin/admissions",color:"#b45309",roles:["superadmin","admission_admin"]},{id:"users",icon:"ð¡ï¸",label:"User Management",desc:"Create and manage admin user accounts",path:"/admin/user-manager",color:"#6d28d9",roles:["superadmin"]},{id:"audit-logs",icon:"ð",label:"Audit Logs",desc:"View system activity and admin logs",path:"/admin/audit-logs",color:"#b91c1c",roles:["superadmin"]},{id:"media",icon:"ð¼ï¸",label:"Media Manager",desc:"Upload and manage site-wide banners, gallery & documents",path:"/admin/media",color:"#0369a1",roles:["superadmin"]}],t=o?.role?.toLowerCase().split(",").map(a=>a.trim())||[],l=d.filter(a=>a.roles.some(r=>t.includes(r)));return e.jsxs("div",{className:"min-h-screen bg-transparent",children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-12",children:[{label:"Role(s)",value:t.join(", ")||"Admin",icon:"ðï¸",color:"blue"},{label:"Department",value:o?.department||"â",icon:"ðï¸",color:"indigo"},{label:"Modules Access",value:l.length,icon:"ð",color:"purple"},{label:"Portal Status",value:"Active",icon:"â
",color:"emerald"}].map((a,r)=>e.jsxs("div",{className:"bg-white p-6 rounded-[2rem] border border-slate-200 shadow-sm hover:shadow-md transition-all duration-300 flex items-center gap-5 group",children:[e.jsx("div",{className:`w-14 h-14 rounded-2xl bg-${a.color}-50 flex items-center justify-center text-2xl group-hover:scale-110 transition-transform duration-300`,children:a.icon}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-bold text-slate-400 uppercase tracking-wider mb-0.5",children:a.label}),e.jsx("div",{className:"text-xl font-extrabold text-slate-800 truncate max-w-[150px]",children:a.value})]})]},r))}),e.jsxs("div",{className:"mb-12",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"h-8 w-1.5 bg-blue-600 rounded-full"}),e.jsx("h2",{className:"text-2xl font-black text-slate-800 uppercase tracking-tight",children:"Admin Utilities"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6",children:[l.map(a=>e.jsxs(s,{to:a.path,className:"bg-white p-6 rounded-[2.5rem] border border-slate-200 shadow-sm hover:shadow-xl hover:border-blue-100 hover:-translate-y-1 transition-all duration-300 group flex items-start gap-6",children:[e.jsx("div",{className:"w-16 h-16 rounded-[1.5rem] flex items-center justify-center text-3xl shrink-0 group-hover:scale-110 transition-transform duration-500",style:{background:a.color+"11",color:a.color},children:a.icon}),e.jsxs("div",{className:"flex-1 min-w-0 pr-8 relative",children:[e.jsx("h3",{className:"text-lg font-bold text-slate-800 mb-2 group-hover:text-blue-600 transition-colors",children:a.label}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed line-clamp-2",children:a.desc}),e.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300 text-blue-500",children:e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",width:"20",height:"20",className:"rotate-0 group-hover:-rotate-45 transition-transform duration-500",children:[e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),e.jsx("polyline",{points:"12 5 19 12 12 19"})]})})]})]},a.id)),l.length===0&&e.jsxs("div",{className:"col-span-full bg-slate-100 p-12 rounded-[3rem] text-center border-2 border-dashed border-slate-200",children:[e.jsx("div",{className:"text-5xl mb-4",children:"ð«"}),e.jsx("p",{className:"text-slate-600 font-bold text-lg",children:"No modules available for your role."}),e.jsx("p",{className:"text-slate-400",children:"Please contact the super-admin for access permissions."})]})]})]}),e.jsxs("div",{className:"mb-12",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"h-8 w-1.5 bg-slate-800 rounded-full"}),e.jsx("h2",{className:"text-2xl font-black text-slate-800 uppercase tracking-tight",children:"Account Settings"})]}),e.jsxs("div",{className:"flex flex-wrap gap-4",children:[t.includes("superadmin")&&e.jsxs(s,{to:"/admin-signup",className:"px-8 py-4 bg-slate-900 text-white font-bold rounded-2xl shadow-lg shadow-slate-200 hover:bg-slate-800 hover:-translate-y-1 transition-all active:scale-95 flex items-center gap-3",children:[e.jsx("span",{className:"text-xl",children:"ð¤"})," Create New User"]}),e.jsxs(s,{to:"/admin/change-password",className:"px-8 py-4 bg-white text-slate-700 font-bold rounded-2xl border border-slate-200 shadow-sm hover:shadow-md hover:border-blue-100 hover:-translate-y-1 transition-all active:scale-95 flex items-center gap-3",children:[e.jsx("span",{className:"text-xl",children:"ð"})," Change Password"]}),e.jsxs(s,{to:"/admin/profile",className:"px-8 py-4 bg-white text-slate-700 font-bold rounded-2xl border border-slate-200 shadow-sm hover:shadow-md hover:border-blue-100 hover:-translate-y-1 transition-all active:scale-95 flex items-center gap-3",children:[e.jsx("span",{className:"text-xl",children:"âï¸"})," Edit Profile"]}),e.jsxs("button",{className:"px-8 py-4 bg-red-50 text-red-600 font-bold rounded-2xl border border-red-100 shadow-sm hover:bg-red-600 hover:text-white hover:-translate-y-1 transition-all active:scale-95 flex items-center gap-3 ml-auto",onClick:n,children:[e.jsx("span",{className:"text-xl",children:"ðª"})," Logout"]})]})]})]})};export{h as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.