import React, { useState } from 'react'; import { CheckCircle2 } from 'lucide-react'; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; interface ForgotPasswordModalProps { isOpen: boolean; onClose: () => void; } export const ForgotPasswordModal: React.FC = ({ isOpen, onClose }) => { const [identifier, setIdentifier] = useState(''); const [sent, setSent] = useState(false); const handleClose = () => { onClose(); // Reset only after the dialog has finished animating out. setTimeout(() => { setSent(false); setIdentifier(''); }, 200); }; return ( !open && handleClose()}> {sent ? (
لینک بازیابی ارسال شد لینک تعیین رمز عبور جدید به شناسه شما ارسال شد.
) : (
{ e.preventDefault(); if (identifier.trim()) setSent(true); }} > بازیابی رمز عبور ایمیل دانشگاهی یا شماره تلفن همراه خود را وارد کنید.
setIdentifier(e.target.value)} placeholder="name@ui.ac.ir" />
)}
); };