import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{$ as t}from"./vendor-charts-iXlq6Rne.js";import{g as n}from"./vendor-react-Dzc9WstK.js";import{t as r}from"./arrow-right-BvVjz62x.js";import{t as i}from"./scroll-text-DO4-qkk2.js";import{t as a}from"./shield-check-BXrqFOgj.js";import{_ as o}from"./vendor-flow-IzlrcDx6.js";import{An as s,Kn as c,dn as l,qn as u,wn as d,xn as f}from"./index-HkVQGc9M.js";var p=e(t(),1),m=o(),h=[{title:`Master Management`,description:`Categories, subcategories, units, and products.`,icon:c,to:`/admin/masters`,module:`masters`},{title:`Users`,description:`Create admin users, assign roles, and control access.`,icon:d,to:`/admin/users`,module:`users`},{title:`Roles & Permissions`,description:`Define roles and fine-grained module permissions.`,icon:a,to:`/admin/users/roles`,module:`roles`},{title:`Notifications`,description:`Channels, templates, and event triggers.`,icon:u,to:`/admin/notifications`,module:`notifications`},{title:`Audit Log`,description:`Review security and configuration changes.`,icon:i,to:`/admin/audit`,module:`audit`},{title:`Settings`,description:`Roles, storage, appearance, and system settings.`,icon:s,to:`/admin/settings`,module:`settings`}];function g(){let e=n(),t=f(e=>e.auth.user),i=(t?.full_name||`Administrator`).split(` `)[0],{data:a}=l(void 0,{skip:t?.user_type!==`admin`}),o=(0,p.useMemo)(()=>a?a.is_superuser?h:h.filter(e=>{if(!e.module)return!1;let t=a.modules?.[e.module];return!!t&&t!==`none`}):[],[a]);return(0,m.jsxs)(`div`,{className:`w-full`,children:[(0,m.jsxs)(`div`,{className:`relative overflow-hidden rounded-[var(--radius-card)] bg-gradient-to-br from-[#0e1a38] via-[#16264d] to-[#0a1228] text-white px-7 py-8 shadow-[var(--shadow-md)]`,children:[(0,m.jsx)(`div`,{className:`absolute -top-16 -right-10 w-64 h-64 rounded-full blur-3xl bg-[#2f54eb]/25`,"aria-hidden":!0}),(0,m.jsxs)(`div`,{className:`relative`,children:[(0,m.jsxs)(`h1`,{className:`mt-4 text-[28px] font-bold tracking-[-0.02em] font-heading leading-tight`,children:[`Welcome back, `,i,`.`]}),(0,m.jsx)(`p`,{className:`mt-2 text-[14px] text-white/75 max-w-xl leading-relaxed`,children:o.length>0?`Manage authentication, users and roles, and the notification system from one place. Pick a module below to get started.`:`Use the sidebar to navigate to your available modules.`})]})]}),o.length>0&&(0,m.jsx)(`div`,{className:`mt-6 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4`,children:o.map(t=>(0,m.jsxs)(`button`,{onClick:()=>e(t.to),className:`group text-left rounded-[var(--radius-card)] bg-[var(--color-surface)] border border-[var(--color-border)] p-5 shadow-[var(--shadow-sm)] hover:shadow-[var(--shadow-md)] hover:border-[var(--color-accent)]/50 transition-all`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,m.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-[var(--color-accent-soft)] flex items-center justify-center`,children:(0,m.jsx)(t.icon,{className:`w-[22px] h-[22px] text-[var(--color-accent-ink)]`})}),(0,m.jsx)(r,{className:`w-4 h-4 text-[var(--color-text-muted)] group-hover:text-[var(--color-primary)] group-hover:translate-x-0.5 transition-all`})]}),(0,m.jsx)(`h3`,{className:`mt-4 text-[15px] font-semibold text-[var(--color-text-primary)]`,children:t.title}),(0,m.jsx)(`p`,{className:`mt-1 text-[12.5px] text-[var(--color-text-muted)] leading-relaxed`,children:t.description})]},t.title))})]})}export{g as default};