import { Block } from 'payload';

export const ImageGallery: Block = {
    slug: 'imageGallery',
    interfaceName: 'ImageGalleryBlock',
    fields: [
        {
            name: 'images',
            type: 'array',
            required: true,
            minRows: 1,
            fields: [
                {
                    name: 'image',
                    type: 'upload',
                    relationTo: 'media',
                    required: true,
                },
                {
                    name: 'alt',
                    type: 'text',
                    required: false,
                },
            ],
        },
    ],
};
