import { A } from '@solidjs/router'; import AdminShell from '~/components/AdminShell'; import { Users, Building2, Briefcase, Clock, Ticket, Receipt, Package, Megaphone, Shield, UserCog, FormInput, LayoutDashboard, BadgeCheck, ArrowRight, } from 'lucide-solid'; import type { Component } from 'solid-js'; type KpiCard = { label: string; value: string; badge?: string; badgeColor: string; href: string; icon: Component; }; const KPI: KpiCard[] = [ { label: 'Total Users', value: '—', badge: '+0%', badgeColor: 'text-emerald-600 bg-emerald-50', href: '/admin/users', icon: Users }, { label: 'Total Revenue', value: '—', badge: 'Weekly', badgeColor: 'text-[#0a1d37] bg-slate-100', href: '/admin/invoice', icon: Receipt }, { label: 'Active Roles', value: '—', badge: 'Live', badgeColor: 'text-amber-600 bg-amber-50', href: '/admin/runtime-roles', icon: Briefcase}, { label: 'Pending Approvals', value: '—', badge: 'Action Required', badgeColor: 'text-white bg-red-500', href: '/admin/approval', icon: Clock }, ]; const ACTIVITY = [ { day: 'MON', h: 40 }, { day: 'TUE', h: 65 }, { day: 'WED', h: 95 }, { day: 'THU', h: 70 }, { day: 'FRI', h: 55 }, { day: 'SAT', h: 30 }, { day: 'SUN', h: 45 }, ]; const QUICK_ACTIONS = [ { label: 'Create New Role', href: '/admin/roles/create', icon: Shield }, { label: 'Configure Dashboard', href: '/admin/external-dashboard-management', icon: LayoutDashboard }, { label: 'Add Employee', href: '/admin/employees', icon: Users }, ]; const PIPELINE = [ { name: 'Candidate Roles', type: 'External Role', status: 'Active', statusColor: 'text-emerald-600 bg-emerald-50', progress: 85, barColor: 'bg-[#fd6216]' }, { name: 'Onboarding Flows', type: 'Schema Builder', status: 'Pending', statusColor: 'text-amber-600 bg-amber-50', progress: 42, barColor: 'bg-amber-400' }, { name: 'Dashboard Config', type: 'UI Config', status: 'Draft', statusColor: 'text-slate-500 bg-slate-100', progress: 12, barColor: 'bg-slate-300' }, ]; const CONTROL: Array<{ label: string; href: string; desc: string; icon: Component; iconBg: string; iconFg: string }> = [ { label: 'Internal Roles', href: '/admin/roles', desc: 'Permissions & access levels for internal staff.', icon: Shield, iconBg: 'bg-blue-50', iconFg: 'text-blue-600' }, { label: 'External Roles', href: '/admin/runtime-roles', desc: 'Modules, credits & capabilities per external role.', icon: UserCog, iconBg: 'bg-violet-50', iconFg: 'text-violet-600' }, { label: 'Onboarding Flows', href: '/admin/onboarding-schemas', desc: 'Schema-driven onboarding forms per external role.', icon: FormInput, iconBg: 'bg-amber-50', iconFg: 'text-amber-600' }, { label: 'External Dashboards', href: '/admin/external-dashboard-management', desc: 'Sidebar, widgets & runtimeConfig per role.', icon: LayoutDashboard, iconBg: 'bg-teal-50', iconFg: 'text-teal-600' }, { label: 'Internal Dashboards', href: '/admin/internal-dashboard-management', desc: 'Home widgets & KPI panels for internal staff.', icon: LayoutDashboard, iconBg: 'bg-orange-50', iconFg: 'text-orange-600' }, { label: 'Approval Queue', href: '/admin/approval', desc: 'Review, approve or reject pending action requests.', icon: BadgeCheck, iconBg: 'bg-rose-50', iconFg: 'text-rose-600' }, ]; export default function AdminDashboard() { return (
{/* ── KPI Cards ── */}
{KPI.map((kpi) => { const Icon = kpi.icon; return ( {/* Left navy accent bar */} {/* ── Activity + Intelligence Hub ── */}
{/* Activity Chart */}

System Activity

Platform traffic & Tracecoin velocity

{ACTIVITY.map((d) => (
{d.day}
))}
{/* Intelligence Hub + Pipeline */}
{/* Intelligence Hub */}

Intelligence Hub

{QUICK_ACTIONS.map((a) => { const Icon = a.icon; return ( {a.label} ); })}
{/* Pipeline Status */}

Pipeline Status

{PIPELINE.map((p) => (

{p.name}

{p.type}

{p.status}
))}
{/* ── Control Plane ── */}

Control Plane

{CONTROL.length} modules
{CONTROL.map((item) => { const Icon = item.icon; return (

{item.label}

{item.desc}

); })}
); }