"use client"; import React, { useState } from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { cn } from "@/shared/utils/cn"; import { DOCS_TOKENS } from "./tokens"; interface NavItem { title: string; href: string; children?: NavItem[]; } interface DocsSidebarProps { sections: NavItem[]; currentPath?: string; className?: string; } export default function DocsSidebar({ sections, currentPath, className }: DocsSidebarProps) { const pathname = usePathname(); const [collapsed, setCollapsed] = useState(false); const isActive = (href: string) => pathname === href || currentPath === href; return (