'use client' import { useState } from 'react' import { useInfrastructureSummary } from '@/lib/hooks/useInfrastructureData' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { GlobalSearch } from './GlobalSearch' import Link from 'next/link' import { Network, Shield, Calendar, DollarSign, Search } from 'lucide-react' export function DocsDashboard() { const { summary, loading, error } = useInfrastructureSummary() const [searchOpen, setSearchOpen] = useState(false) const cards = [ { title: 'Network Topology', description: 'View and edit regional network topology diagrams', icon: Network, href: '/infrastructure/docs/topology', color: 'text-blue-400', bgColor: 'bg-blue-500/10', stats: summary ? { label: 'Regions', value: summary.totalRegions, } : null, }, { title: 'Compliance Mapping', description: 'Track compliance requirements by country and region', icon: Shield, href: '/infrastructure/docs/compliance', color: 'text-green-400', bgColor: 'bg-green-500/10', stats: summary ? { label: 'Countries', value: summary.totalCountries, } : null, }, { title: 'Deployment Timeline', description: 'Manage infrastructure deployment milestones and schedules', icon: Calendar, href: '/infrastructure/docs/timeline', color: 'text-purple-400', bgColor: 'bg-purple-500/10', stats: summary ? { label: 'In Progress', value: summary.deploymentProgress.inProgress, } : null, }, { title: 'Cost Estimates', description: 'View and manage cost estimates by region and category', icon: DollarSign, href: '/infrastructure/docs/costs', color: 'text-yellow-400', bgColor: 'bg-yellow-500/10', stats: summary ? { label: 'Total Annual', value: `$${(summary.totalCost / 1000000).toFixed(1)}M`, } : null, }, ] if (loading) { return (
Manage network topology, compliance, deployment timelines, and cost estimates