import { faqs } from "@/content/faq";
import { Section } from "@/components/layout/Section";
import {
  Accordion,
  AccordionContent,
  AccordionItem,
  AccordionTrigger,
} from "@/components/ui/accordion";

export function Faq() {
  return (
    <Section id="faq" riftPattern="whisper">
      <h2 className="text-center text-3xl font-bold">Frequently asked questions</h2>
      <Accordion type="single" collapsible className="mx-auto mt-10 max-w-2xl">
        {faqs.map((faq, i) => (
          <AccordionItem key={faq.id} value={faq.id}>
            <AccordionTrigger className="text-left">
              <span className="mr-3 text-[#ffb300]">{String(i + 1).padStart(2, "0")}.</span>
              {faq.question}
            </AccordionTrigger>
            <AccordionContent className="text-muted-foreground">{faq.answer}</AccordionContent>
          </AccordionItem>
        ))}
      </Accordion>
    </Section>
  );
}
