from wagtail.blocks import RichTextBlock
from wagtail.embeds.blocks import EmbedBlock

from base.blocks import StreamBlock, HeadingBlock, ImageBlock
from wagtailcodeblock.blocks import CodeBlock

class BlogPostBlock(StreamBlock):
    heading_block = HeadingBlock()
    paragraph = RichTextBlock(blank=True)
    code = CodeBlock(label='Code snippet')
    image_block = ImageBlock()
    embed_block = EmbedBlock(
        help_text="Insert a URL to embed. For example, https://www.youtube.com/watch?v=SGJFWirQ3ks",
        icon="media",
    )