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


class TreeView(Component):
    """
    A tree of nested items.

    :CSS:

        ``dazzler-extra-tree-view``
        - ``tree-item``
        - ``tree-item-label``
        - ``tree-sub-items``
        - ``tree-caret``
        - ``selected``
        - ``level-{n}``

    :example:

    .. literalinclude:: ../../tests/components/pages/treeview.py
    """
    _aspect_keys = []
    _children = []
    items = Aspect(required=True, docstring="An array of items to render recursively.")  # noqa: E501
    selected = Aspect(docstring="Last clicked path identifier joined by dot.")
    expanded_items = Aspect(default=UNDEFINED, docstring="Identifiers that have sub items and are open.READONLY. (default=[])")  # noqa: E501
    nest_icon_collapsed = Aspect(default='⏵', docstring="Icon to show when sub items are hidden. (default='⏵')")  # noqa: E501
    nest_icon_expanded = Aspect(default='⏷', docstring="Icon to show when sub items are shown. (default='⏷')")  # noqa: E501
    class_name = Aspect()
    style = Aspect()

    def __init__(
            self,
            items: typing.List[typing.Union[str, typing.Dict[str, typing.Union[str, typing.List[typing.Any]]]]],  # noqa: E501
            selected: typing.Optional[str] = UNDEFINED,
            expanded_items: typing.Optional[typing.List] = UNDEFINED,
            nest_icon_collapsed: typing.Optional[str] = '⏵',
            nest_icon_expanded: typing.Optional[str] = '⏷',
            class_name: typing.Optional[str] = UNDEFINED,
            style: typing.Optional[typing.Dict] = UNDEFINED,
            identity: str = None
    ):
        """
        :param items: An array of items to render recursively.
        :param selected: Last clicked path identifier joined by dot.
        :param expanded_items: Identifiers that have sub items and are
            open. READONLY. (default=[])
        :param nest_icon_collapsed: Icon to show when sub items are hidden.
            (default='⏵')
        :param nest_icon_expanded: Icon to show when sub items are shown.
            (default='⏷')
        :param class_name:
        :param style:
        """
        Component.__init__(self, locals(), identity)
