"use client"; import { useCallback, useRef } from "react"; import { usePathname } from "next/navigation"; import * as Accordion from "@radix-ui/react-accordion"; import { ToolGroup as IToolGroup } from "@/config/tools"; import { cn } from "@/lib/style"; import { icons } from "@/components/icons"; import { ToolLink } from "./tool-link"; type Props = IToolGroup & { isOpend: boolean; }; export function ToolGroup({ Icon, title, href, tools, isOpend }: Props) { const pathname = usePathname(); const triggerRef = useRef(null); const onClick = useCallback(() => triggerRef.current?.click(), []); return (
svg]:rotate-180" )} aria-label="toggle open/close state of the tool group" >
    {Object.values(tools).map(tool => (
  • ))}
); }