import type { MantineColor, RingProgressProps } from "@mantine/core"; import { Card, Center, Group, RingProgress, ScrollArea, Stack, Text, Title, Tooltip } from "@mantine/core"; import { IconDatabaseHeart, IconFileDescription, IconHeartbeat, IconTransform } from "@tabler/icons-react"; import { useRequiredBoard } from "@homarr/boards/context"; import { humanFileSize } from "@homarr/common"; import type { TdarrPieSegment, TdarrStatistics } from "@homarr/integrations"; import { useI18n } from "@homarr/translation/client"; import type { TablerIcon } from "@homarr/ui"; const PIE_COLORS: MantineColor[] = ["cyan", "grape", "gray", "orange", "pink"]; interface StatisticsPanelProps { statistics: TdarrStatistics; } export function StatisticsPanel(props: StatisticsPanelProps) { const t = useI18n("widget.mediaTranscoding.panel.statistics"); const allLibs = props.statistics; // Check if Tdarr hs any Files if (!(allLibs.totalFileCount > 0)) { return (