import { useAuthStore } from '../hooks/use-auth'; import { motion } from 'framer-motion'; import type { Variants } from 'framer-motion'; import { FolderKanban, FileSignature, Users, ArrowUpRight, Activity, Zap, ShieldCheck } from 'lucide-react'; import { Link } from 'react-router-dom'; import { PageHeader } from '../components/ui/PageHeader'; import { PageLayout } from '../components/layout/PageLayout'; const containerVariants: Variants = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { staggerChildren: 0.1 } } }; const itemVariants: Variants = { hidden: { opacity: 0, y: 30 }, show: { opacity: 1, y: 0, transition: { type: 'spring', stiffness: 300, damping: 24 } } }; export const DashboardPage = () => { const user = useAuthStore((state) => state.user); const CARDS = user?.role === 'ADMIN' ? [ { title: 'Asset Library', description: 'Manage and assign premium marketing collateral, brand guidelines, and shared resources.', icon: FolderKanban, path: '/admin/assets', metrics: 'View Catalog' }, { title: 'Legal Engine', description: 'Strict version control for active NDAs, MSAs, and partner compliance tracking.', icon: FileSignature, path: '/admin/legal', metrics: 'Legal Templates' }, { title: 'Partner Directory', description: 'View active channel partners, audit logs, and their assigned enterprise content.', icon: Users, path: '/admin/partners', metrics: 'Manage Partners' } ] : [ { title: 'Asset Library', description: 'Browse, search, and download your assigned enterprise resources and pitch decks.', icon: FolderKanban, path: '/client/assets', metrics: 'My Assets' }, { title: 'Legal Agreements', description: 'View signed compliance documentation and download copies of active agreements.', icon: FileSignature, path: '/client/agreements', metrics: 'My Agreements' } ]; // Header component const headerNode = (
System Active
} /> ); return ( {/* Stats Grid */} {user?.role === 'ADMIN' && ( {[ { label: 'Global Network Uptime', value: '99.99%', icon: Activity, trend: '+0.01%' }, { label: 'Active Data Streams', value: '1,492', icon: Zap, trend: '+12%' }, { label: 'Security Compliance', value: 'Level 4', icon: ShieldCheck, trend: 'Verified' } ].map((stat, i) => (

{stat.label}

{stat.value}

{stat.trend}
))}
)} {/* Main Action Cards */} {CARDS.map((card, idx) => (
{card.metrics}

{card.title}

{card.description}

))}
); }; export default DashboardPage;