import { useState, useEffect } from "react"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { Button } from "@/components/ui/button"; export default function HeroCarousel() { const [currentSlide, setCurrentSlide] = useState(0); const slides = [ { image: "https://images.unsplash.com/photo-1578662996442-48f60103fc96?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&h=600", title: "Arranging Funeral", subtitle: "Compassionate care during life's most difficult moments", buttonText: "Learn More" }, { image: "https://images.unsplash.com/photo-1581833971358-2c8b550f87b3?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&h=600", title: "Memorial Services", subtitle: "Celebrating life and preserving precious memories", buttonText: "Our Services" }, { image: "https://images.unsplash.com/photo-1572276596237-5db2c3e16c5d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&h=600", title: "Pre-Planning Services", subtitle: "Plan ahead to ease the burden on your loved ones", buttonText: "Contact Us" } ]; useEffect(() => { const timer = setInterval(() => { setCurrentSlide((prev) => (prev + 1) % slides.length); }, 5000); return () => clearInterval(timer); }, [slides.length]); const nextSlide = () => { setCurrentSlide((prev) => (prev + 1) % slides.length); }; const prevSlide = () => { setCurrentSlide((prev) => (prev - 1 + slides.length) % slides.length); }; return (
{slides.map((slide, index) => (
{/* Background image */}
{/* Content */}

{slide.title}

{slide.subtitle}

))} {/* Navigation arrows */} {/* Slide indicators */}
{slides.map((_, index) => (
); }