'use client'

import { motion } from 'framer-motion'
import { ReactNode } from 'react'

interface AnimatedIconProps {
  children: ReactNode
  delay?: number
}

export default function AnimatedIcon({ children, delay = 0 }: AnimatedIconProps) {
  return (
    <motion.div
      className="animation-icon"
      initial={{ opacity: 0, scale: 0.8 }}
      whileInView={{ opacity: 1, scale: 1 }}
      viewport={{ once: true }}
      transition={{ duration: 0.5, delay }}
      whileHover={{ scale: 1.1, rotate: 5 }}
    >
      {children}
    </motion.div>
  )
}

