use std::sync::Arc;
pub type IconRenderer = Arc<dyn Fn(&str) -> String + Send + Sync>;
pub const DEFAULT_CONTAINER_ICON: &str = r#"<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 4v8a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H8L6.5 3H3a1 1 0 0 0-1 1z"/></svg>"#;
pub const DEFAULT_LEAF_ICON: &str = r#"<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="12" height="12" rx="1"/><line x1="2" y1="6" x2="14" y2="6"/><line x1="2" y1="10" x2="14" y2="10"/><line x1="6" y1="6" x2="6" y2="14"/></svg>"#;
pub const CHEVRON_RIGHT: &str = r#"<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 2 8 6 4 10"/></svg>"#;
pub const SIDEBAR_ICON: &str = r#"<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="12" height="12" rx="1"/><line x1="6" y1="2" x2="6" y2="14"/></svg>"#;
#[must_use]
pub fn default_icon_renderer() -> IconRenderer {
Arc::new(|_node_kind: &str| DEFAULT_LEAF_ICON.to_owned())
}
#[must_use]
pub fn container_leaf_icon_renderer() -> IconRenderer {
Arc::new(|node_type: &str| {
if node_type == "folder" {
DEFAULT_CONTAINER_ICON.to_owned()
} else {
DEFAULT_LEAF_ICON.to_owned()
}
})
}