'use client'; import { cn } from '@/lib/utils'; import { Button } from '@/components/ui/button'; interface TocItem { id: string; text: string; level: number; element: HTMLElement; } interface TableOfContentsProps { tocItems: TocItem[]; activeId: string; className?: string; } export const TableOfContents = ({ tocItems, activeId, className }: TableOfContentsProps) => { const scrollToHeading = (id: string) => { const element = document.getElementById(id); if (element) { element.scrollIntoView({ behavior: 'smooth', block: 'start', }); } }; return ( ); };