import { Cell, Pie, PieChart, ResponsiveContainer } from "recharts"; interface StatusDonutProps { down: number; up: number; } const UP_COLOR = "var(--td-success-color)"; const DOWN_COLOR = "var(--td-error-color)"; const EMPTY_COLOR = "var(--td-bg-color-component-disabled)"; export function StatusDonut({ down, up }: StatusDonutProps) { const total = up + down; const availability = total > 0 ? ((up / total) * 100).toFixed(1) : "-"; const data = total > 0 ? [ { name: "UP", value: up }, { name: "DOWN", value: down }, ] : [{ name: "EMPTY", value: 1 }]; const colors = total > 0 ? [UP_COLOR, DOWN_COLOR] : [EMPTY_COLOR]; return (