import FaqAccordionGroup, { FaqItem } from "./FaqAccordionGroup";
import FaqIntroPanel from "./FaqIntroPanel";

type FaqGroup = {
  id: string;
  title: string;
  items: FaqItem[];
  headingTag?: "h2" | "h3";
  boxClassName?: string;
};

const reimbursementAnswer =
  "We reimburse all expenses of the Client for the payment of fines and penalties that were caused by mistakes made by us in accounting and tax accounting and reporting.";

const faqGroups: FaqGroup[] = [
  {
    id: "accordion-general",
    title: "General Questions",
    headingTag: "h2",
    items: [
      { question: "What is included in the free plan?", answer: reimbursementAnswer },
      { question: "Can I cancel my subscription at any time?", answer: reimbursementAnswer },
      { question: "Is my data safe with your platform?", answer: reimbursementAnswer },
      { question: "Do you offer team or enterprise plans?", answer: reimbursementAnswer },
      { question: "Will the software work on all devices?", answer: reimbursementAnswer },
    ],
  },
  {
    id: "accordion-privacy",
    title: "Privacy & Support",
    items: [
      {
        question: "How is my personal information protected?",
        answer:
          "We protect your personal information with advanced encryption, secure data storage, and strict privacy policies, ensuring it remains safe and accessible only to authorized personnel.",
      },
      {
        question: "Do you store my payment details?",
        answer:
          "No. All payment transactions are processed through trusted third-party gateways. We do not store any credit card or financial details on our servers.",
      },
      {
        question: "Will my project or design files remain confidential?",
        answer:
          "Yes, your project and design files will remain fully confidential. We implement strict security measures, encrypted storage, and access controls to protect your work at every stage.",
      },
      {
        question: "How can I contact support if I need help?",
        answer:
          "You can contact support via email, live chat, or our help center, where our team is ready to assist you with any questions or issues promptly.",
      },
      {
        question: "What if I need revisions or updates after delivery?",
        answer:
          "If you need revisions or updates after delivery, we offer flexible options to make adjustments, ensuring the final result meets your expectations and requirements.",
      },
    ],
  },
  {
    id: "accordion-pricing",
    title: "Pricing Package",
    boxClassName: "mb-0",
    items: [
      { question: "What is included in the free plan?", answer: reimbursementAnswer },
      { question: "Can I cancel my subscription at any time?", answer: reimbursementAnswer },
      { question: "Is my data safe with your platform?", answer: reimbursementAnswer },
      { question: "Do you offer team or enterprise plans?", answer: reimbursementAnswer },
      { question: "Will the software work on all devices?", answer: reimbursementAnswer },
    ],
  },
];

export default function FaqSection() {
  return (
    <section className="faq-sec space">
      <div className="carousel-container">
        <div className="row">
          <div className="col-lg-5">
            <FaqIntroPanel />
          </div>

          <div className="col-lg-7">
            <div className="faq-info">
              {faqGroups.map((group) => (
                <FaqAccordionGroup
                  key={group.id}
                  groupId={group.id}
                  title={group.title}
                  items={group.items}
                  headingTag={group.headingTag}
                  boxClassName={group.boxClassName}
                />
              ))}
            </div>
          </div>
        </div>
      </div>
    </section>
  );
}
