import type { Meta, StoryObj } from '@storybook/react'

import RichTextBlock from '..'
import RichTextBlockWithContainer from './RichTextBlockWithContainer'
import { mockRichTextBlockProps } from './mockRichTextBlockProps'

const meta: Meta<typeof RichTextBlock> = {
  title: '@baseapp-frontend | wagtail/Blocks/RichTextBlock',
  component: RichTextBlockWithContainer,
  tags: ['autodocs'],
  argTypes: {
    value: {
      description: 'The value returned from the Wagtail API.',
      table: {
        type: {
          summary: 'RichTextBlockValue',
        },
      },
    },
  },
}

export default meta

type Story = StoryObj<typeof RichTextBlock>

export const DefaultRichTextBlock: Story = {
  name: 'Default RichTextBlock',
  args: {
    ...mockRichTextBlockProps,
  },
}
