import ls from "./GenericExplorer.less"; import React, {useState} from 'react'; import cx from 'classnames'; import {AiFillCaretDown, AiFillCaretRight} from "react-icons/ai"; import {BsDot} from "react-icons/bs"; interface GenericExplorerControlProps { title: string; onClick: any; on: boolean; children: any; } export function GenericExplorerControl(props: GenericExplorerControlProps) { return {props.children} } interface GenericExplorerNodeProps { children: any; controls: any; label: any; selected: boolean; highlighted: boolean; defaultExpanded?: boolean; expandable: boolean; select: any; onMouseEnter?: any; onMouseLeave?: any; } export function GenericExplorerNode(props: GenericExplorerNodeProps) { const [expanded, setExpanded] = useState(!!props.defaultExpanded); const expandable = props.expandable; const toggle = expandable ? (() => setExpanded(expanded => !expanded)) : undefined; return <>