import { AlertTriangle, Loader2, RefreshCw, WifiOff } from 'lucide-react'; import { useTranslation } from '../../i18n'; import { fs } from '../shared/DialogShell'; import { CardAction, TourNotice } from './tourParts'; /** * How a card's online read stands while it has no answer to show (a bike * tour's ways, a hike's SAC grades): still asking, offline, or failed with a * way to ask again. Nothing while the answer is there, so the card shows it. */ export function ReadStatusNotice({ status, messages, onRetry, }: { status: string; messages: { loading: string; offline: string; failed: string }; onRetry: () => void; }) { const { t } = useTranslation(); if (status === 'loading') return ( {messages.loading} ); if (status === 'offline') return }>{messages.offline}; if (status !== 'failed') return null; return ( }> {messages.failed} } onClick={onRetry}> {t('common.errorRetry')} ); }