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


const TextBlock: Block = {
  slug: 'text',
  imageURL: '/admin/blocks/cta-sections.png',
  labels: {
    singular: 'Text Section',
    plural: 'Texts Sections',
  },

  admin: {
    disableBlockName: true,
    /*components: {
      Label: CustomLabel,
    },*/
  },
  fields: [
    {
      name: 'title',
      type: 'text',
    },
    {
      name: 'paragraph',
      type: 'text',
    },
    {
      name: 'content',
      type: 'richText',
      editor: lexicalEditor({}),
      required: false,
    },
  ],
}

export default TextBlock;