from django.utils.translation import gettext_lazy as _

from wagtail.blocks import StreamBlock

from ocyan.main.loading import get_ocyan_classes

# pylint: disable=unbalanced-tuple-unpacking
(
    CoyoteImages,
    CoyoteVideo,
    CoyoteContent,
    CoyoteIconsWithText,
    CoyoteLogos,
    CoyoteCallToAction,
    CoyoteCenterText,
    CoyoteTabsBlock,
    CoyoteImageWithText,
    CoyoteCHeaderImages,
    CoyoteAccordionAllBlock,
    CoyoteDummyBlock,
    CoyotePersonListBlock,
    CoyoteQuotesBlock,
    CoyoteTextListBlock,
) = get_ocyan_classes(
    "coyote.blocks",
    [
        "CoyoteImages",
        "CoyoteVideo",
        "CoyoteContent",
        "CoyoteIconsWithText",
        "CoyoteLogos",
        "CoyoteCallToAction",
        "CoyoteCenterText",
        "CoyoteTabsBlock",
        "CoyoteImageWithText",
        "CoyoteCHeaderImages",
        "CoyoteAccordionAllBlock",
        "CoyoteDummyBlock",
        "CoyotePersonListBlock",
        "CoyoteQuotesBlock",
        "CoyoteTextListBlock",
    ],
)


class HomePageHeaderStreamBlock(StreamBlock):
    picture = CoyoteImages()
    video = CoyoteVideo()
    content = CoyoteContent()


class HomePageContentStreamBlock(StreamBlock):
    picture_with_text = CoyoteImageWithText(icon="image", label=_("Image with text"))
    icons_with_text = CoyoteIconsWithText(
        icon="info-circle", label=_("Icons with text")
    )
    centered_content = CoyoteCenterText(
        icon="collapse-down", label=_("Centered content")
    )
    logos = CoyoteLogos(icon="tag", label=_("Logos"))
    quotes = CoyoteQuotesBlock(icon="openquote", label=_("Quotes"))
    accordion = CoyoteAccordionAllBlock(icon="list-ul", label=_("Accordion"))
    tabbed_content = CoyoteTabsBlock(icon="list-ul", label=_("Tabbed content"))
    about_us = CoyotePersonListBlock(icon="group", label=_("About us"))
    paragraph_columns = CoyoteTextListBlock(
        icon="list-ul", label=_("Paragraph columns")
    )


class HomePageFooterStreamBlock(StreamBlock):
    call_to_action = CoyoteCallToAction(icon="chain-broken", label=_("Call to action"))
    newsletter = CoyoteDummyBlock(icon="mail", label=_("Newsletter"))


class ContactPageHeaderStreamBlock(StreamBlock):
    picture = CoyoteCHeaderImages()


class ContactPageContentStreamBlock(StreamBlock):
    centered_content = CoyoteCenterText(
        icon="collapse-down", label=_("Centered content")
    )
    logos = CoyoteLogos(icon="tag", label=_("Logos"))
    quotes = CoyoteQuotesBlock(icon="openquote", label=_("Quotes"))
    accordion = CoyoteAccordionAllBlock(icon="list-ul", label=_("Accordion"))
    tabbed_content = CoyoteTabsBlock(icon="list-ul", label=_("Tabbed content"))


class ContactPageFooterStreamBlock(StreamBlock):
    call_to_action = CoyoteCallToAction(icon="chain-broken", label=_("Call to action"))
    newsletter = CoyoteDummyBlock(icon="mail", label=_("Newsletter"))
