
__all__ = ["TreeViewPropertyFrame"]

import omni.ui as ui
from ..base_frame import WidgetCollectionFrame
from ..create_widget import PropertyType


class TreeViewPropertyFrame(WidgetCollectionFrame):
    def __init__(self, frame_label: str, widget: ui.Widget) -> None:
        super().__init__(frame_label, widget)

    def _build_ui(self):

        self._add_property(self._widget, "columns_resizable", PropertyType.BOOL)
        self._add_property(self._widget, "header_visible", PropertyType.BOOL)
        self._add_property(self._widget, "root_visible", PropertyType.BOOL)
        self._add_property(self._widget, "expand_on_branch_click", PropertyType.BOOL)
        self._add_property(self._widget, "keep_alive", PropertyType.BOOL)
        self._add_property(self._widget, "keep_expanded", PropertyType.BOOL)
        self._add_property(self._widget, "drop_between_items", PropertyType.BOOL)
