"use client"; import { useState } from "react"; import Link from "next/link"; import GsapReveal from "@/components/common/GsapReveal"; const leftFAQs = [ { q: "How long does it take to build a website?", a: "Typically 2–6 weeks depending on complexity.", }, { q: "Will my website be mobile-friendly?", a: "Yes, all our websites are fully responsive.", }, { q: "Do you provide SEO services?", a: "Yes, we offer SEO optimization during development and advanced SEO packages.", }, { q: "Can you integrate payment gateways?", a: "Yes, we integrate Razorpay, Stripe, PayPal and more.", }, { q: " Do you offer support after launch?", a: "Yes, we provide maintenance and support packages.", }, ]; const rightFAQs = [ { q: "What platform do you use for website development?", a: "We work with WordPress, Shopify, custom HTML, React, and other platforms depending on your business needs.", }, { q: "Can I update the website myself after launch?", a: "Yes. We build user-friendly websites and provide basic training so you can update content easily.", }, { q: "Do you provide hosting and domain services?", a: "Yes, we can help you purchase domain, set up hosting, and manage everything technically.", }, { q: "Will my website be secure?", a: "Absolutely. We implement SSL, security plugins, firewall protection, and regular updates to ensure your website is protected.", }, { q: "Do you build websites for specific industries?", a: "Yes. We develop websites for healthcare, education, real estate, finance, e-commerce, startups, and many more industries.", }, ]; const AccordionItem = ({ faq, isOpen, onToggle, align, }: { faq: { q: string; a: string }; isOpen: boolean; onToggle: () => void; align: "left" | "right"; }) => (

{faq.a}

); const FAQ = ({ faqData }: { faqData?: { question: string; answer: string }[] }) => { const [openId, setOpenId] = useState("left-0"); const toggleFaq = (id: string) => { setOpenId(prev => prev === id ? null : id); }; // If no faqData provided, use empty arrays // const faqs = faqData || []; // const half = Math.ceil(faqs.length / 2); // const leftFAQs = faqs.slice(0, half); // const rightFAQs = faqs.slice(half); // if (faqs.length === 0) return null; return (
{/* Section Header */}
FAQ

Frequently Asked Questions

{/* 3-Column Layout: Left FAQs | Center Image | Right FAQs */}
{/* ===== LEFT: FAQs ===== */}
{leftFAQs.map((faq, idx) => ( toggleFaq(`left-${idx}`)} align="left" /> ))}
FAQ Section
{/* ===== RIGHT: FAQs ===== */}
{rightFAQs.map((faq, idx) => ( toggleFaq(`right-${idx}`)} align="right" /> ))}
); }; export default FAQ;