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