'use client';

import { motion } from 'framer-motion';

interface GradientFlowProps {
  className?: string;
  colors?: string[];
  duration?: number;
}

export function GradientFlow({
  className = '',
  colors = ['#C41E3A', '#D4A574', '#8B4513', '#2F4F4F'],
  duration = 15
}: GradientFlowProps) {
  return (
    <motion.div
      className={`absolute inset-0 ${className}`}
      style={{
        background: `linear-gradient(-45deg, ${colors.join(', ')})`,
        backgroundSize: '400% 400%'
      }}
      animate={{
        backgroundPosition: ['0% 50%', '100% 50%', '0% 50%']
      }}
      transition={{
        duration,
        repeat: Infinity,
        ease: 'linear'
      }}
    />
  );
}

export default GradientFlow;