"use client" import Image from "next/image" import { useState } from "react" import { getIconForFolder, getIconForOpenFolder } from "vscode-icons-js" import { TFile, TFolder, TTab } from "./types" import SidebarFile from "./file" export default function SidebarFolder({ data, selectFile, }: { data: TFolder selectFile: (file: TTab) => void }) { const [isOpen, setIsOpen] = useState(false) const folder = isOpen ? getIconForOpenFolder(data.name) : getIconForFolder(data.name) return ( <>