"use client";

import { motion, HTMLMotionProps } from "framer-motion";

interface FadeUpProps extends HTMLMotionProps<"div"> {
  delay?: number;
  duration?: number;
  yOffset?: number;
  xOffset?: number;
}

export function FadeUp({ 
  children, 
  delay = 0, 
  duration = 0.8,
  yOffset = 0,
  xOffset = 0,
  className,
  ...props 
}: FadeUpProps) {
  return (
    <motion.div
      initial={{ opacity: 0, y: yOffset, x: xOffset }}
      whileInView={{ opacity: 1, y: 0, x: 0 }}
      viewport={{ once: true, margin: "0px" }}
      transition={{ 
        duration, 
        delay,
        ease: [0.21, 0.47, 0.32, 0.98] // Professional easing (easeOutQuart)
      }}
      className={className}
      {...props}
    >
      {children}
    </motion.div>
  );
}
