"""Autogenerated file: DO NOT EDIT!"""
import typing  # noqa: F401
from dazzler.system import Component, Aspect, UNDEFINED  # noqa: F401


class Markdown(Component):
    """
    A react-markdown wrapper for dazzler.

    :CSS: ``dazzler-markdown-markdown``
    """
    _aspect_keys = []
    _children = []
    source = Aspect(required=True, docstring="Markdown string to render.")
    class_name = Aspect(docstring="CSS class of the container element.")
    style = Aspect(docstring="Style object to give to container.")
    escape_html = Aspect(default=True, docstring="Escape html element in the source. (default=True)")  # noqa: E501
    skip_html = Aspect(docstring="Skip rendering of html elements.")
    source_pos = Aspect(docstring="Add data-sourcepos attributes to elements.")
    allowed_types = Aspect(docstring="Which type of node to allow rendering, default to all.")  # noqa: E501
    disallowed_types = Aspect(docstring="Which types of nodes should not be rendered, default to none.")  # noqa: E501
    unwrap_disallowed = Aspect(docstring="Setting to true will try to extract/unwrap the childrenof disallowed nodes. For instance, if disallowing Strong,the default behaviour is to simply skip the text within thestrong altogether, while the behaviour some might want is tosimply have the text returned without the strong wrapping it.")  # noqa: E501
    link_target = Aspect(docstring="Set the default target for link tags. (`_blank` to open a new tab)")  # noqa: E501

    def __init__(
            self,
            source: str,
            class_name: typing.Optional[str] = UNDEFINED,
            style: typing.Optional[typing.Dict] = UNDEFINED,
            escape_html: typing.Optional[bool] = True,
            skip_html: typing.Optional[bool] = UNDEFINED,
            source_pos: typing.Optional[bool] = UNDEFINED,
            allowed_types: typing.Optional[typing.List] = UNDEFINED,
            disallowed_types: typing.Optional[typing.List] = UNDEFINED,
            unwrap_disallowed: typing.Optional[bool] = UNDEFINED,
            link_target: typing.Optional[str] = UNDEFINED,
            identity: str = None
    ):
        """
        :param source: Markdown string to render.
        :param class_name: CSS class of the container element.
        :param style: Style object to give to container.
        :param escape_html: Escape html element in the source.
            (default=True)
        :param skip_html: Skip rendering of html elements.
        :param source_pos: Add data-sourcepos attributes to elements.
        :param allowed_types: Which type of node to allow rendering,
            default to all.
        :param disallowed_types: Which types of nodes should not be
            rendered, default to none.
        :param unwrap_disallowed: Setting to true will try to
            extract/unwrap the children of disallowed nodes. For instance, if
            disallowing Strong, the default behaviour is to simply skip the
            text within the strong altogether, while the behaviour some might
            want is to simply have the text returned without the strong
            wrapping it.
        :param link_target: Set the default target for link tags. (`_blank`
            to open a new tab)
        """
        Component.__init__(self, locals(), identity)
