"use client"; import type React from "react"; import { motion, type Variants, useReducedMotion } from "framer-motion"; import { DrawLine } from "./animations/DrawLine"; import { TextDiffuseReveal } from "./animations/TextDiffuseReveal"; import { Reveal } from "./Reveal"; interface SectionProps { id?: string; eyebrow?: string; title: string; description?: string; dark?: boolean; aside?: React.ReactNode; children: React.ReactNode; disableChildrenAnimation?: boolean; } export const Section = ({ id, eyebrow, title, description, dark, aside, children, disableChildrenAnimation = false, }: SectionProps) => { const shouldReduceMotion = useReducedMotion(); const baseClass = dark ? "ds-section ds-section-dark" : "ds-section"; const containerVariants: Variants = { hidden: {}, visible: { transition: { delayChildren: 0.02, staggerChildren: 0.08, }, }, }; const itemVariants: Variants = { hidden: shouldReduceMotion ? { opacity: 0 } : { opacity: 0, y: 18 }, visible: { opacity: 1, y: 0, transition: shouldReduceMotion ? { duration: 0.25, ease: [0.16, 1, 0.3, 1] } : { type: "spring", stiffness: 60, damping: 20, mass: 0.85, }, }, }; return (
{eyebrow && ( {eyebrow} )}

{description && ( {description} )}
{aside && ( {aside} )}
{!disableChildrenAnimation ? (
{children}
) : (
{children}
)}
); };