import type { ReactNode } from "react"; import { RoundedRockVoronoiBackground } from "@/components/brand/RoundedRockVoronoiBackground"; import { TopoCurvyExtend } from "@/components/brand/TopoCurvyExtend"; import { WavyContourLinesBackground } from "@/components/brand/WavyContourLinesBackground"; import { ScrollReveal } from "@/components/motion/ScrollReveal"; import { TopoSectionProvider } from "@/components/layout/TopoSectionContext"; import { toneFromSectionVariant, type TopoPatternId } from "@/content/topo-patterns"; import { cn } from "@/lib/utils"; type Props = { id?: string; className?: string; children: ReactNode; /** Override section backdrop (rock on green, contours on white); pass `null` to hide. */ background?: ReactNode | null; variant?: "default" | "muted" | "inverse"; /** @deprecated Patterns are hero + footer only; kept for API compatibility */ riftPattern?: TopoPatternId; /** @deprecated */ riftFlow?: boolean; }; export function Section({ id, className, children, background, variant = "default", riftPattern, riftFlow, }: Props) { void riftPattern; void riftFlow; const tone = toneFromSectionVariant(variant); const isGreen = tone === "green"; return (
{isGreen && (background !== undefined ? ( background ) : ( ))} {!isGreen && (background !== undefined ? ( background ) : ( ))} {!isGreen && } {children}
); }