import { Info } from 'lucide-react' import { useTranslation } from 'react-i18next' import { Alert, AlertDescription } from '@/components/ui/alert' type FormDirtyIndicatorProps = { isDirty: boolean message?: string } /** * Visual indicator that the form has unsaved changes * * @example * ```tsx * * ``` */ export function FormDirtyIndicator({ isDirty, message, }: FormDirtyIndicatorProps) { const { t } = useTranslation() if (!isDirty) return null return ( {message ?? t('You have unsaved changes')} ) }