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