import { useState, useEffect } from 'react'
const backgrounds = [
'/background-1.jpg',
'/background-2.jpg',
'/background-3.jpg',
'/background-4.jpg',
]
export default function HeroCarousel() {
const [currentIndex, setCurrentIndex] = useState(0)
useEffect(() => {
const interval = setInterval(() => {
setCurrentIndex((prev) => (prev + 1) % backgrounds.length)
}, 6000)
return () => clearInterval(interval)
}, [])
return (
{/* Background images with crossfade */}
{backgrounds.map((bg, index) => (
))}
{/* Dark overlay for text readability */}
{/* Subtle vignette effect */}
{/* Carousel indicators */}
{backgrounds.map((_, index) => (
)
}