"use client" import { FilePlus, FolderPlus, Search } from "lucide-react" import SidebarFile from "./file" import SidebarFolder from "./folder" import { TFile, TFolder } from "./types" // Note: add renaming validation: // In general: must not contain / or \ or whitespace, not empty, no duplicates // Files: must contain dot // Folders: must not contain dot export default function Sidebar({ files, selectFile, }: { files: (TFile | TFolder)[] selectFile: (tab: TFile) => void }) { return (