import { Cell, Pie, PieChart, ResponsiveContainer, } from 'recharts'; import { Card } from '@/components/ui/Card'; type IpPoolChartProps = { used: number; total: number; }; export function IpPoolChart({ used, total, }: IpPoolChartProps) { const available = Math.max( total - used, 0, ); const percentage = total > 0 ? ((used / total) * 100).toFixed(2) : '0.00'; const data = [ { name: 'Used', value: used, }, { name: 'Available', value: available, }, ]; return (

IP Pool Usage

{data.map((_, index) => ( ))}

{used} {' '} used IPs

{available} {' '} available

{percentage}%

); }