import { Block } from 'payload'

export const CollapsiblesBlock: Block = {
  slug: 'collapsibles',
  labels: {
    singular: {
      de: 'Aufklappbare Liste',
    },
    plural: {
      de: 'Aufklappbare Listen',
    },
  },
  fields: [
    {
      name: 'items',
      type: 'array',
      required: true,
      minRows: 1,
      labels: {
        singular: {
          de: 'Eintrag',
        },
        plural: {
          de: 'Einträge',
        },
      },
      fields: [
        {
          name: 'title',
          type: 'text',
          required: true,
          label: {
            de: 'Titel',
          },
        },
        {
          name: 'content',
          type: 'richText',
          required: true,
          label: {
            de: 'Inhalt',
          },
        },
      ],
    },
  ],
}
