"use client"; import Image from "next/image"; import React, { useState, useEffect } from "react"; import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, } from "@/components/ui/carousel"; import { Card, CardContent } from "@/components/ui/card"; import Autoplay from "embla-carousel-autoplay"; import Link from "next/link"; import { ArrowRight } from "lucide-react"; const Hero = () => { const plugin = React.useRef( Autoplay({ delay: 4000, stopOnInteraction: true }) ); const [isMobile, setIsMobile] = useState(false); useEffect(() => { const checkMobile = () => { setIsMobile(window.innerWidth < 768); }; checkMobile(); window.addEventListener("resize", checkMobile); return () => window.removeEventListener("resize", checkMobile); }, []); const heroData = [ { type: "image", src: "/rudraksh banner image 2.avif", overlay: { title: "Sacred Collection", subtitle: "Discover Authentic Rudraksha", description: "Explore our curated selection of premium spiritual items", link: "/collection", }, }, { type: "image", src: "/rudraksha banner 1.png", overlay: { title: "Quality Assured", subtitle: "Lifetime Authenticity Guarantee", description: "Every piece comes with our exclusive certification", link: "/products/premium-rudraksha-consultation-astrology", }, }, { type: "image", src: "/rudraksha banner 2.png", overlay: { title: "Sacred Ceremonies", subtitle: "Traditional Prana Pratistha", description: "Blessed at the ancient Pashupatinath temple", link: "/collection/online-pooja", }, }, ]; return (