// "use client"; // import React, { useState } from "react"; // import { // FolderTree, // Edit3, // Trash2, // Plus, // ChevronRight, // ChevronDown, // } from "lucide-react"; // import { Category } from "@/lib/categories.api"; // export function CategoryTree({ // nodes, // onEdit, // onDelete, // onAddChild, // }: { // nodes: Category[]; // onEdit: (c: Category) => void; // onDelete: (id: string) => void; // onAddChild: (parentId: string) => void; // }) { // return ( //
// {nodes.map((node) => ( // // ))} //
// ); // } // function TreeNode({ // node, // onEdit, // onDelete, // onAddChild, // }: { // node: Category; // onEdit: (c: Category) => void; // onDelete: (id: string) => void; // onAddChild: (parentId: string) => void; // }) { // const [open, setOpen] = useState(true); // return ( //
// {/* NODE ROW */} //
//
// // // {/* INLINE EDIT TRIGGER */} // onEdit(node)} // className="text-sm font-medium cursor-pointer hover:text-blue-600" // > // {node.name} // //
// {/* ACTIONS (SHOW ON HOVER) */} //
// // // //
//
// {/* CHILDREN */} // {open && node.children?.length ? ( //
// {node.children.map((child) => ( // // ))} //
// ) : null} //
// ); // }