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

interface ContactFaqProps {
  faqs: Array<{ id: string; title: string; content: string }>;
  containerClassName?: string;
}

export const ContactFaq: React.FC<ContactFaqProps> = ({ faqs, containerClassName = '' }) => {
  const containerRef = useRef<HTMLDivElement>(null);
  const itemRefs = useRef<(HTMLDivElement | null)[]>([]);

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

  const { } = useCardAnimation(animationOptions);

  return (
    <div ref={containerRef} className={containerClassName}>
      {faqs.map((faq) => (
        <div key={faq.id} className="faq-item">
          <h3>{faq.title}</h3>
          <p>{faq.content}</p>
        </div>
      ))}
    </div>
  );
};

export default ContactFaq;
