// components/ImageSlideshow.tsx
'use client'
import { useState } from 'react'
import Image from 'next/image'
import burgerImg from '@/assets/burger.jpg'
import curryImg from '@/assets/curry.jpg'
import pizzaImg from '@/assets/pizza.jpg'
import classes from './ImageSlideshow.module.css'
const images = [
{ src: burgerImg, alt: 'A juicy burger' },
{ src: curryImg, alt: 'A spicy curry' },
{ src: pizzaImg, alt: 'A fresh pizza' },
]
export default function ImageSlideshow() {
const [currentIndex, setCurrentIndex] = useState(0)
return (
<div className={classes.slideshow}>
{images.map((image, index) => (
<Image
key={index}
src={image.src}
alt={image.alt}
className={index === currentIndex ? classes.active : ''}
/>
))}
</div>
)
}