import React, { useState } from 'react'; import { Button } from '../../ui/button'; import { Input } from '../../ui/input'; import { X, AlertTriangle, Loader2 } from 'lucide-react'; import { useToast } from '../../../context/ToastContext'; interface DeleteAccountConfirmModalProps { onClose: () => void; onConfirm: () => void; } export const DeleteAccountConfirmModal: React.FC< DeleteAccountConfirmModalProps > = ({ onClose, onConfirm }) => { const { addToast } = useToast(); const [password, setPassword] = useState(''); const [loading, setLoading] = useState(false); const handleDelete = () => { if (!password) { addToast('Please enter your password to confirm', 'error'); return; } setLoading(true); // Simulate API call setTimeout(() => { setLoading(false); onConfirm(); }, 2000); }; return (
This is the final step. Once you click delete, your account will be queued for immediate removal. You will be logged out.