import { motion } from "motion/react" import { InView } from "@/components/ui/InView" import type { ReactNode } from "react" interface AnimatedSectionProps { direction?: "up" | "right" | "left" delay?: number children: ReactNode } function getDirection(direction: 'up' | 'right' | 'left') { switch (direction) { case 'up': return { y: [40, 0], opacity: [0, 1] } case 'right': return { x: [-40, 0], opacity: [0, 1] } case 'left': return { x: [40, 0], opacity: [0, 1] } } } export function AnimatedSection({ direction = "up", delay = 0, children, }: AnimatedSectionProps) { const { y, opacity } = getDirection(direction) return ( {children} ) }