import Link from 'next/link'; import type { ReactNode } from 'react'; import { ViewTransitionWrapper } from '$shared/ui'; interface SectionPanelProps { /** * Display number prefix (e.g. "01") */ number: string; /** * Section title */ title: string; /** * HTML id for anchor navigation */ id: string; /** * Whether this section is expanded */ isActive: boolean; /** * Navigation URL for the collapsed heading link */ href: string; /** * Section content, shown when active */ children: ReactNode; } /** * Accordion-style section that collapses to a navigation link when inactive. */ export function SectionPanel({ number, title, id, isActive, href, children }: SectionPanelProps) { const heading = `${number}. ${title}`; return (
{isActive ? (

{heading}

{children}
) : ( {heading} )}
); }