import { FolderState } from "../ExplorerNode" // Current state of folders let explorerState: FolderState[] function toggleExplorer(this: HTMLElement) { // Toggle collapsed state of entire explorer this.classList.toggle("collapsed") const content = this.nextElementSibling as HTMLElement content.classList.toggle("collapsed") content.style.maxHeight = content.style.maxHeight === "0px" ? content.scrollHeight + "px" : "0px" } function toggleFolder(evt: MouseEvent) { evt.stopPropagation() // Element that was clicked const target = evt.target as HTMLElement // Check if target was svg icon or button const isSvg = target.nodeName === "svg" // corresponding