import { rem, ActionIcon, Tooltip, Card, Stack, Group, Text, } from '@mantine/core'; import { Copy } from 'lucide-react'; import { safeExecute } from '@/utils/logger'; export interface InfoItem { label: string; value: string; } interface InfoCardProps { title: string; items: InfoItem[]; loading?: boolean; } export const InfoCard = ({ title, items, loading = false }: InfoCardProps) => { const copyInfo = async () => { const info = items.map((item) => `${item.label}: ${item.value}`).join('\n'); await safeExecute( () => navigator.clipboard.writeText(info), `Failed to copy ${title.toLowerCase()}` ); }; if (loading) { return ( {title} Loading... ); } return ( {title} {items.map((item, index) => ( {item.label}: {item.value} ))} ); };