"use client"; import Image from "next/image"; import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, } from "@/components/ui/carousel"; import { Button } from "@/components/ui/button"; import { motion } from "framer-motion"; import Link from "next/link"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, } from "../ui/dialog"; import { Input } from "../ui/input"; import { Textarea } from "../ui/textarea"; import { useState } from "react"; import Autoplay from "embla-carousel-autoplay"; // ✅ Import plugin autoplay import { useRef } from "react"; const heroImages = ["/Hero.png", "/hero-bdg2.png", "/hero-bdg3.png"]; export default function Header() { const [open, setOpen] = useState(false); // ✅ Gunakan useRef untuk plugin autoplay const plugin = useRef(Autoplay({ delay: 4000, stopOnInteraction: false })); return (
{heroImages.map((img, index) => (
{`JAECOO {index === 0 && (
JAECOO J7 SHS-P DELICATE OFF-ROAD SUV
MAS JAECOO Logo
FORM TEST DRIVE