import { ReactNode } from 'react';
import { useCardStack } from '../../CardStackContext';

export interface AutoCarouselProps {
  children: ReactNode;
  className?: string;
  ariaLabel?: string;
}

export function AutoCarousel({ children, className = '', ariaLabel = 'Auto carousel' }: AutoCarouselProps) {
  const { isVisible, getAnimationProps } = useCardStack();
  const animationProps = getAnimationProps();

  return (
    <div
      className={className}
      aria-label={ariaLabel}
      data-is-visible={animationProps.isVisible}
    >
      {children}
    </div>
  );
}

export default AutoCarousel;
