import type { Block } from 'payload';

const FAQBlock: Block = {
  slug: 'faq',
  imageURL: '/admin/blocks/faq-sections.png',
  labels: {
    singular: 'FAQ Block',
    plural: 'FAQ Blocks',
  },
  fields: [
    {
      name: 'title',
      type: 'text',
    },
    {
      name: 'paragraph',
      type: 'text',
    },
    {
      name: 'faqs',
      type: 'array',
      fields: [
        { name: 'question', type: 'text', required: true },
        { name: 'answer', type: 'textarea' },
      ],
    },
  ],
};

export default FAQBlock;