'use client'; import { useState } from 'react'; import clsx from 'clsx'; import { GridTileImage } from 'components/grid/tile'; import ArrowLeftIcon from 'components/icons/arrow-left'; export function Gallery({ title, amount, currencyCode, images }: { title: string; amount: string; currencyCode: string; images: { src: string; altText: string }[]; }) { const [currentImage, setCurrentImage] = useState(0); function handleNavigate(direction: 'next' | 'previous') { if (direction === 'next') { setCurrentImage(currentImage + 1 < images.length ? currentImage + 1 : 0); } else { setCurrentImage(currentImage === 0 ? images.length - 1 : currentImage - 1); } } const buttonClassName = 'px-9 cursor-pointer ease-in-and-out duration-200 transition-bg bg-[#7928ca] hover:bg-violetDark'; return (