'use client' import { motion, AnimatePresence } from 'framer-motion' import { useState, useEffect } from 'react' import Link from 'next/link' import Image from 'next/image' const heroSlots = [ { srcs: [ 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641696/ayrisapart/hero/1_cxfvrw.jpg', 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641696/ayrisapart/hero/9_vym2pc.jpg', 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641696/ayrisapart/hero/8_kjih1z.jpg', ], rotate: 15, top: '5%', left: '22%', size: 'w-48 h-64 md:w-64 md:h-80', delay: 0.2 }, { srcs: [ 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641695/ayrisapart/hero/7_yuouc0.jpg', 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641695/ayrisapart/hero/4_eeyoge.jpg', 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641695/ayrisapart/hero/3_tolqzo.jpg', ], rotate: -15, top: '8%', left: '58%', size: 'w-52 h-64 md:w-72 md:h-80', delay: 0.4 }, { srcs: [ 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641695/ayrisapart/hero/2_dfrmwi.jpg', 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641695/ayrisapart/hero/5_mmcnjw.jpg', 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641696/ayrisapart/hero/6_x44c4w.jpg', ], rotate: -8, top: '60%', left: '18%', size: 'w-48 h-60 md:w-64 md:h-72', delay: 0.6 }, { srcs: [ 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641695/ayrisapart/hero/4_eeyoge.jpg', 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641695/ayrisapart/hero/5_mmcnjw.jpg', 'https://res.cloudinary.com/du7xohbct/image/upload/v1776641696/ayrisapart/hero/9_vym2pc.jpg', ], rotate: -8, top: '62%', left: '62%', size: 'w-52 h-64 md:w-72 md:h-88', delay: 0.8 } ] function FloatingSlot({ slot, idx }: { slot: typeof heroSlots[0], idx: number }) { const [currentIdx, setCurrentIdx] = useState(0) useEffect(() => { const interval = setInterval(() => { setCurrentIdx((prev) => (prev + 1) % slot.srcs.length) }, 4000 + idx * 500) return () => clearInterval(interval) }, [slot.srcs.length, idx]) return ( ) } export default function Hero({ lang, dict }: { lang: string, dict: any }) { return ( {/* BACKGROUND TEXT */} {dict.hero.title} {/* FLOATING SLOTS */} {heroSlots.map((slot, idx) => ( ))} {/* BOTTOM CONTENT */} {dict.hero.desc} {dict.hero.explore} ) }