import React from 'react'; import { AlertTriangle } from 'lucide-react'; import type { ShrinkFinding } from '../../domain/syncGuards'; import { Button } from '../ui/button'; import { useI18n } from '../../application/i18n/I18nProvider'; interface Props { finding: Extract; onRestore: () => void; onForcePush: () => void; } export const SyncBlockedBanner: React.FC = ({ finding, onRestore, onForcePush }) => { const { t } = useI18n(); const entityLabel = t(`sync.entityType.${finding.entityType}`); const percent = finding.baseCount > 0 ? Math.round((finding.lost / finding.baseCount) * 100) : 0; const reasonText = finding.reason === 'bulk-shrink' ? t('sync.blocked.reason.bulkShrink', { lost: finding.lost, baseCount: finding.baseCount, entityType: entityLabel, percent, }) : t('sync.blocked.reason.largeShrink', { lost: finding.lost, entityType: entityLabel, }); return (
{t('sync.blocked.title')}

{reasonText}

{t('sync.blocked.detail')}

); };