import { Avatar, Badge, Button, Card, Group, Stack, Text, useComputedColorScheme } from '@mantine/core' import { Link } from '@tanstack/react-router' import { TbAlertTriangle, TbChevronRight, TbDeviceMobile } from 'react-icons/tb' interface AppCardProps { id: string name: string status: 'active' | 'warning' | 'error' users?: number errors: number version: string maintenance?: boolean } export function AppCard({ id, name, status, errors, version, maintenance }: AppCardProps) { const statusColor = maintenance ? 'gray' : status === 'active' ? 'teal' : status === 'warning' ? 'orange' : 'red' const statusLabel = maintenance ? 'Maintenance' : status === 'active' ? 'Active' : status === 'warning' ? 'Warning' : 'Error' const scheme = useComputedColorScheme('light', { getInitialValueInEffect: true }) return ( ({ root: { backgroundColor: 'var(--mantine-color-body)', borderColor: scheme === 'dark' ? 'rgba(255,255,255,0.08)' : 'rgba(0,0,0,0.05)', transition: 'transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease', '&:hover': { transform: 'translateY(-4px)', boxShadow: theme.shadows.md, borderColor: 'rgba(37, 99, 235, 0.3)', }, }, })} > {name} {/* v{version} */} {statusLabel} Open Errors 0 ? 'red' : 'teal'} variant="light" size="sm" leftSection={errors > 0 ? : undefined} > {errors > 0 ? errors : 'None'} ) }