'use client' import { Box, Chip, CircularProgress, Tooltip, Typography } from '@mui/material' import CloudSyncIcon from '@mui/icons-material/CloudSync' import CheckCircleIcon from '@mui/icons-material/CheckCircle' import ErrorIcon from '@mui/icons-material/Error' import ScheduleIcon from '@mui/icons-material/Schedule' interface SyncStatusIndicatorProps { status: 'synced' | 'syncing' | 'pending' | 'error' pendingCount?: number errorMessage?: string } export function SyncStatusIndicator({ status, pendingCount = 0, errorMessage }: SyncStatusIndicatorProps) { if (status === 'synced') { return ( } label="Synced" variant="outlined" color="success" size="small" sx={{ fontWeight: 500 }} /> ) } if (status === 'syncing') { return ( } label="Syncing..." variant="filled" color="primary" size="small" sx={{ fontWeight: 500 }} /> ) } if (status === 'pending') { return ( } label={`${pendingCount} pending`} variant="outlined" color="warning" size="small" sx={{ fontWeight: 500 }} /> ) } // error return ( Sync Error {errorMessage && ( {errorMessage} )} ) }