import { Card } from "./ui/card"; import { Button } from "./ui/button"; import { Badge } from "./ui/badge"; import { AlertTriangle, CheckCircle2, Clock, TrendingUp, Package, FileCheck, MessageSquare, ArrowRight, Bell, Camera, Activity } from "lucide-react"; type Tab = "dashboard" | "inventory" | "protocol"; interface DashboardProps { setActiveTab: (tab: Tab) => void; } export function Dashboard({ setActiveTab }: DashboardProps) { const stats = [ { label: "Chemicals Tracked", value: "252", icon: Package, color: "text-[#5a9584]" }, { label: "Low Stock (<20%)", value: "2", icon: AlertTriangle, color: "text-amber-600" }, { label: "Expiring Soon", value: "3", icon: Clock, color: "text-red-600" }, { label: "Protocols Reviewed", value: "12", icon: FileCheck, color: "text-[#2d5a4a]" }, ]; const lowStockAlerts = [ { chemical: "Sodium Hydroxide", location: "Cabinet B-1", percentFull: 15, lab: "Lab 305" }, { chemical: "Ethanol", location: "Cabinet A-5", percentFull: 18, lab: "Lab 201" }, ]; const expirationAlerts = [ { chemical: "Hydrochloric Acid", location: "Acid Cabinet", daysLeft: -2, status: "expired", lab: "Lab 201" }, { chemical: "Benzene", location: "Flammables Cabinet", daysLeft: 15, status: "expiring-soon", lab: "Lab 305" }, { chemical: "Acetone", location: "Cabinet A-3", daysLeft: 28, status: "expiring-soon", lab: "Lab 201" }, ]; const recentActivity = [ { action: "Scanned and added Methanol via photo", time: "30 mins ago", type: "inventory" }, { action: "Protocol safety review completed", time: "2 hours ago", type: "protocol" }, { action: "Low stock alert: Sodium Hydroxide", time: "4 hours ago", type: "alert" }, { action: "Expiration reminder sent for 3 chemicals", time: "1 day ago", type: "reminder" }, ]; const alerts = [ { message: "Hydrochloric Acid expired 2 days ago - requires disposal", severity: "critical" }, { message: "Sodium Hydroxide below 20% full - reorder needed", severity: "warning" }, { message: "3 chemicals expiring in next 30 days", severity: "warning" }, ]; return (
Your AI-powered lab safety and compliance assistant
{stat.label}
{stat.value}
Ask questions with sourced answers
Get AI safety feedback
Photo capture with auto-fill
{alert.chemical}
{alert.lab} • {alert.location}
{alert.chemical}
{alert.lab} • {alert.location}
{activity.action}
{activity.time}
{alert.message}