import { useEffect } from 'react'; import { Button } from './ui/button'; interface SetupModalProps { title: string; message: string; showProgress?: boolean; showRetry?: boolean; onRetry?: () => void; autoClose?: number; onClose?: () => void; } export function SetupModal({ title, message, showProgress, showRetry, onRetry, autoClose, onClose, }: SetupModalProps) { useEffect(() => { if (autoClose && onClose) { const timer = window.setTimeout(() => { onClose(); }, autoClose); return () => window.clearTimeout(timer); } return undefined; }, [autoClose, onClose]); return (
{message}
{showProgress && (