use ratatui::{
style::{Color, Style},
text::Line,
};
use crate::primitives::tree_view::tree_node::TreeNode;
use crate::primitives::tree_view::tree_view_ref::TreeViewRef;
impl<'a, 'b, T> TreeViewRef<'a, 'b, T> {
pub fn new(nodes: &'b [TreeNode<T>]) -> Self {
Self {
nodes,
block: None,
render_fn: Box::new(|_data, _state| Line::from("Node")),
expand_icon: "\u{25b6}",
collapse_icon: "\u{25bc}",
highlight_style: None,
icon_style: Style::default().fg(Color::DarkGray),
show_filter_ui: false,
}
}
}