--- interface Props { headings: { depth: number; slug: string; text: string }[]; } const { headings } = Astro.props; const shown = headings.filter((h) => h.depth <= 3); const min = Math.min(...shown.map((h) => h.depth)); ---