import { Block } from 'payload';

export const HeroSection: Block = {
    slug: 'heroSection',
    interfaceName: 'HeroSectionBlock',
    fields: [
        {
            name: 'badge',
            type: 'text',
            required: false,
        },
        {
            name: 'title',
            type: 'text',
            required: true,
        },
        {
            name: 'subtitle',
            type: 'textarea',
            required: false,
        },
        {
            name: 'backgroundImage',
            type: 'upload',
            relationTo: 'media',
            required: false,
        },
        {
            name: 'ctaLabel',
            type: 'text',
            required: false,
        },
        {
            name: 'ctaHref',
            type: 'text',
            required: false,
        },
        {
            name: 'alignment',
            type: 'select',
            defaultValue: 'left',
            options: [
                { label: 'Left', value: 'left' },
                { label: 'Center', value: 'center' },
            ],
        },
    ],
};
