import { useParallax } from "@/hooks/useScrollProgress"; import { Box } from '@/ui/Box'; import { Container } from '@/ui/Container'; import { Heading } from '@/ui/Heading'; import { Text } from '@/ui/Text'; import { Stack } from '@/ui/Stack'; import { useRef } from 'react'; interface AlternatingSectionProps { heading: string; description: string | React.ReactNode; mockup: React.ReactNode; layout: 'text-left' | 'text-right'; backgroundImage?: string; backgroundVideo?: string; } export function AlternatingSection({ heading, description, mockup, layout, backgroundImage, backgroundVideo }: AlternatingSectionProps) { const sectionRef = useRef(null); const bgParallax = useParallax(sectionRef, 0.1); return ( {backgroundVideo && ( {/* Dark overlay to ensure readability */} )} {backgroundImage && !backgroundVideo && ( {/* Dark overlay to ensure readability */} )} {/* Text Content */} {heading} {typeof description === 'string' ? ( {description} ) : ( description )} {/* Mockup */} {mockup} {/* Decorative corner accents */} ); }