import { For } from 'solid-js'; import AdminShell from '~/components/AdminShell'; import { ActionButton } from '~/components/admin/AdminUi'; import { Eye, Pencil, Trash2 } from 'lucide-solid'; const kpis = [ { title: 'Total Users', value: '12,458', delta: '+12.5%', note: '+1,245 from last month', tone: 'up' as const, icon: 'users' as const }, { title: 'Active Companies', value: '1,234', delta: '+8.2%', note: '+94 from last month', tone: 'up' as const, icon: 'building' as const }, { title: 'Open Leads', value: '847', delta: '-3.1%', note: '-27 from last month', tone: 'down' as const, icon: 'trend' as const }, { title: 'Credits Purchased', value: '$45,890', delta: '+18.7%', note: '+$7,234 from last month', tone: 'up' as const, icon: 'card' as const }, ]; const trendSeries = [62, 70, 81, 75, 88, 102]; const revSeries = [42000, 48000, 55000, 51000, 62000, 69000]; const maxAmount = 80000; const recentLeads = [ { title: 'Website Redesign Project', customer: 'TechCorp Inc.', category: 'Developers', budget: '$15,000', status: 'Active' }, { title: 'Corporate Event Photography', customer: 'EventMasters LLC', category: 'Photographer', budget: '$3,500', status: 'Pending' }, { title: 'Marketing Campaign Design', customer: 'BrandHub Co.', category: 'Graphics Designer', budget: '$8,200', status: 'Active' }, { title: 'Social Media Management', customer: 'GrowthStart', category: 'Social Media Manager', budget: '$5,000', status: 'Negotiating' }, ]; function KpiIcon(props: { kind: 'users' | 'building' | 'trend' | 'card' }) { const common = 'h-10 w-10 text-[#fd6116]'; if (props.kind === 'users') { return ( ); } if (props.kind === 'building') { return ( ); } if (props.kind === 'trend') { return ( ); } return ( ); } export default function AdminHomePage() { return (

Dashboard Overview

Welcome back! Here's what's happening with your platform today.

Export Report
{(item) => (
{item.tone === 'up' ? '↗' : '↘'} {item.delta}

{item.title}

{item.value}

{item.note}

)}

Leads Trend

Monthly leads performance overview

120 90 60 30 0
{() =>
}
{(month) => {month}}
Total Leads Converted

Revenue Overview

Monthly revenue vs expenses comparison

80000 60000 40000 20000 0
{() =>
}
{(value) => (
)}
{(month) => {month}}
Revenue Expenses

Recent Leads

Latest customer inquiries and opportunities

View All Leads
{(lead, index) => ( )}
LEAD TITLE CUSTOMER CATEGORY BUDGET STATUS ACTIONS
{lead.title} {lead.customer} {lead.category} {lead.budget} {lead.status}
); }