"use client"; import { Button } from "@/components/ui/Button"; import { Carousel } from "@/components/ui/Carousel"; import { Section } from "@/components/ui/Section"; import { Heading, Text } from "@/components/ui/Typography"; import { useTranslation } from "@/lib/hooks/useTranslation"; import { CarouselSlide } from "@/lib/types/carousel"; import { container } from "@/lib/utils"; import Image from "next/image"; export default function HeroCarousel() { const { t } = useTranslation(); // Carousel data with translations const carouselData: CarouselSlide[] = [ { id: 1, title: t('hero.title'), titleColored: t('hero.title_colored'), titleEnd: t('hero.title_end'), description: t('hero.description'), buttonText: t('hero.build_box_button'), buttonLink: "/build-box", imageSrc: "/assets/images/carousel1.png" }, { id: 2, title: t('hero.title'), titleColored: t('hero.title_colored'), titleEnd: t('hero.title_end'), description: t('hero.description'), buttonText: t('hero.build_box_button'), buttonLink: "/build-box", imageSrc: "/assets/images/carousel2.png" }, { id: 3, title: t('hero.title'), titleColored: t('hero.title_colored'), titleEnd: t('hero.title_end'), description: t('hero.description'), buttonText: t('hero.build_box_button'), buttonLink: "/build-box", imageSrc: "/assets/images/carousel1.png" } ]; // Default slide to use as fallback const defaultSlide: CarouselSlide = { id: 0, title: t('hero.title'), titleColored: t('hero.title_colored'), titleEnd: t('hero.title_end'), description: t('hero.description'), buttonText: t('hero.build_box_button'), buttonLink: "/build-box", imageSrc: "/assets/images/image1.png" }; // Create mobile slide components - each image needs to be in a container div const mobileImageSlides = carouselData.map((slide, index) => (