'use client'; /** * SyncStatusIndicator Component * * Displays sync status with external issue trackers. * * @module features/issues/components/SyncStatusIndicator */ import { CheckCircle2, RefreshCw, AlertCircle, AlertTriangle } from 'lucide-react'; import { cn } from '@/lib/utils'; import type { SyncStatus } from '../types'; import { SYNC_STATUS_CONFIG } from '../constants'; const SYNC_ICONS = { synced: CheckCircle2, pending: RefreshCw, conflict: AlertTriangle, error: AlertCircle, } as const; interface SyncStatusIndicatorProps { status: SyncStatus; className?: string; showLabel?: boolean; } export function SyncStatusIndicator({ status, className, showLabel = false, }: SyncStatusIndicatorProps) { const config = SYNC_STATUS_CONFIG[status] || SYNC_STATUS_CONFIG.synced; const Icon = SYNC_ICONS[status] || CheckCircle2; const isPending = status === 'pending'; return (
); }