'use client'; import { useState, type ReactNode } from 'react'; import styles from './schoolSections.module.css'; export interface AdmissionsView { id: string; /** Button text. "This year" and the "N-year trend" label are asserted by the * e2e journey, so they are not free to drift. */ label: string; content: ReactNode; /** The year view sizes its tile grid to match the chart beside it, so each * view keeps its own class rather than sharing one wrapper style. */ className?: string; } /** * The only interactive part of the primary admissions section, and the only * client component in components/school/. * * Every view is always present in the DOM and visibility is toggled with the * `hidden` attribute, so the server-rendered markup passed in as content never * ships as client JavaScript — this component carries the state and nothing * else. * * It spans the header and the viewport because the segmented control sits * inside .admissionsHeader beside the