'use client';

import AOS from 'aos';
import 'aos/dist/aos.css';
import { useEffect } from 'react';

interface AosInitProps {
  children: React.ReactNode;
}

export const AosProvider = ({ children }: AosInitProps) => {
  useEffect(() => {
    const timer = setTimeout(() => {
      AOS.init({
        mirror: false,
        once: false,
        offset: 100,
        duration: 600,
        easing: 'ease-out-quart',
      });
    }, 500);

    return () => {
      clearTimeout(timer);
      AOS.refreshHard();
    };
  }, []);

  return <>{children}</>;
};
