import React from 'react'; import { Button } from '@/components/ui/button'; interface ProductImage { url: string; altText?: string; } interface ProductDetailGalleryProps { images: ProductImage[]; selectedImageIndex?: number; onImageSelect?: (index: number) => void; } const ProductDetailGallery: React.FC = ({ images, selectedImageIndex = 0, onImageSelect }) => { const selectedImage = selectedImageIndex; const setSelectedImage = onImageSelect || (() => {}); return (
{/* Main Image */}
{images.length > 0 ? ( {images[selectedImage].altText ) : (
)}
{/* Image Thumbnails */} {images.length > 1 && (
{images.map((image, index) => ( ))}
)}
); }; export default ProductDetailGallery;