import React from 'react'
import Accordion from './ui/Accordion'
import { FAQProps } from '@/app/types'

const FAQ: React.FC<FAQProps> = ({ faqs }) => {
  return (
    <div className="w-full max-w-[1250px] mx-auto">
      <div className="pl-4 py-5 sticky">
        <h2 className="text-3xl font-bold text-center py-4">
          Часто задаваемые вопросы:
        </h2>
        {faqs.map((faq) => (
          <Accordion key={faq.id} title={faq.title} content={faq.content} />
        ))}
      </div>
    </div>
  )
}

export default FAQ
