import React, { useRef } from 'react';
import { useCardAnimation, UseCardAnimationOptions } from '@/hooks/useCardAnimation';

interface GridLayoutProps {
  children: React.ReactNode;
  containerClassName?: string;
}

export const GridLayout: React.FC<GridLayoutProps> = ({ children, containerClassName = '' }) => {
  const containerRef = useRef<HTMLDivElement>(null);
  const itemRefs = useRef<(HTMLDivElement | null)[]>([]);
  const perspectiveRef = useRef<HTMLDivElement>(null);
  const bottomContentRef = useRef<HTMLDivElement>(null);

  const animationOptions: UseCardAnimationOptions = {
    containerRef,
    itemRefs,
    perspectiveRef,
    bottomContentRef,
  };

  const { } = useCardAnimation(animationOptions);

  return (
    <div ref={containerRef} className={containerClassName}>
      {children}
    </div>
  );
};

export default GridLayout;
