import { formatDistanceToNow } from 'date-fns' import { Check, Copy } from 'lucide-react' import { useState } from 'react' import { toast } from 'sonner' import { Badge, Card, CardContent, copyToClipboard, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from 'ui' import type { Installation, PrivateApp } from '../../PrivateAppsContext' interface ViewAppSheetInfoProps { app: PrivateApp isInstalled: boolean installation: Installation | undefined } function CopyableId({ id, label }: { id: string; label: string }) { const [isCopied, setIsCopied] = useState(false) function handleCopy(e: React.MouseEvent) { e.stopPropagation() copyToClipboard(id, () => { setIsCopied(true) toast.success(`Copied ${label} to clipboard`) setTimeout(() => setIsCopied(false), 2000) }) } return ( ) } export function ViewAppSheetInfo({ app, isInstalled, installation }: ViewAppSheetInfoProps) { return (