/** * GallerySettingsSection * * Settings for gallery element type. * Manages gallery cards with images, titles, and descriptions. */ import React from 'react'; import { mdiPlus, mdiTrashCan } from '@mdi/js'; import BaseButton from '../BaseButton'; import CardBox from '../CardBox'; import FormField from '../FormField'; import type { GallerySettingsSectionProps } from './types'; const GallerySettingsSection: React.FC = ({ galleryCards, onAddCard, onRemoveCard, onUpdateCard, context, imageAssetOptions = [], }) => { const isConstructor = context === 'constructor'; return (

Gallery cards

{galleryCards.length === 0 ? (

No cards yet.

) : ( galleryCards.map((card, index) => (

Card {index + 1}

onRemoveCard(card.id)} />
{isConstructor ? ( ) : ( onUpdateCard(card.id, 'imageUrl', event.target.value) } /> )} onUpdateCard(card.id, 'title', event.target.value) } />