import React, { useState, useEffect } from 'react'; import { Button, Typography, Stack, Box } from '@mui/material'; import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; // استيراد أيقونة السهم const SidePanel = ({ setMode, mode }) => { const [currentSlide, setCurrentSlide] = useState(0); const slides = [ { image: '/images/waitress3.png', title: "Welcome to our cutting-edge postal application,", description: "Welcome to our cutting-edge postal application, where sending and receiving mail has never been more convenient and efficient." }, { image: '/images/waitress3.png', title: "Second Slide Title", description: "Welcome to our cutting-edge postal application, where sending and receiving mail has never been more convenient and efficient." }, { image: '/images/waitress3.png', title: "Third Slide Title", description: "Welcome to our cutting-edge postal application, where sending and receiving mail has never been more convenient and efficient." }, { image: '/images/waitress3.png', title: "Fourth Slide Title", description: "Welcome to our cutting-edge postal application, where sending and receiving mail has never been more convenient and efficient." } ]; useEffect(() => { const interval = setInterval(() => { setCurrentSlide((prev) => (prev + 1) % slides.length); }, 5000); return () => clearInterval(interval); }, [slides.length]); return ( {/* الصورة الحالية */} {`Slide {/* مربع النص في الأسفل */} {slides[currentSlide].description} {/* مؤشرات الشرائح */} {slides.map((_, index) => ( setCurrentSlide(index)} /> ))} ) } export default SidePanel;