import { Block } from 'payload'
import { lexicalHTML } from '@payloadcms/richtext-lexical'

export const ParagraphBlock: Block = {
  slug: 'text',
  labels: {
    singular: {
      de: 'Text'
    },
    plural: {
      de: 'Text'
    }
  },
  fields: [
    {
      name: 'content',
      type: 'richText',
      required: true
    },
    lexicalHTML('content', { name: 'content_html' }),
    {
      name: 'width',
      label: {
        de: "Breite"
      },
      type: 'radio',
      options: ["1/2", "3/4"],
      required: true,
      defaultValue: "1/2"
    }
  ]
}