import React, { useState } from 'react'; import { Box, Stack ,useTheme} from '@mui/material'; import Side from './Side'; import EmailInputSection from './EmailInputSection'; import OtpVerification from './OtpVerification'; import NewPassword from './NewPassword'; import Congratulations from './Congratulations'; const ForgetForm = () => { const [emailOrPhone, setEmailOrPhone] = useState(''); const [currentSlide, setCurrentSlide] = useState(0); const theme = useTheme(); const slides = [ { component: EmailInputSection, title: "Email Verification" }, { component: OtpVerification, title: "OTP Verification" }, { component: NewPassword, title: "New Password" }, { component: Congratulations, title: "Congratulations" } ]; const handleNext = () => { if (currentSlide < slides.length - 1) { setCurrentSlide(prev => prev + 1); } }; const handleBack = () => { if (currentSlide > 0) { setCurrentSlide(prev => prev - 1); } }; const CurrentComponent = slides[currentSlide].component; return ( {/* ✅ Sidebar يظهر فقط من sm+ */} {/* ✅ Form */} {/* إظهار المكون الحالي فقط */} {/* ✅ مؤشر الشرائح السفلي */} {slides.map((_, index) => ( setCurrentSlide(index)} // يمكنك تفعيلها لاحقًا /> ))} ); }; export default ForgetForm;