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

export const ChatBubble: Block = {
  slug: 'chatBubble',
  fields: [
    {
      name: 'author',
      type: 'text',
      defaultValue: 'KLZ Team',
    },
    {
      name: 'avatar',
      type: 'text',
    },
    {
      name: 'role',
      type: 'text',
      defaultValue: 'Assistant',
    },
    {
      name: 'align',
      type: 'select',
      options: ['left', 'right'],
      defaultValue: 'left',
    },
    {
      name: 'content',
      type: 'richText',
      editor: lexicalEditor({}),
      required: true,
    },
  ],
};
