import React, { useState } from "react"; import { ChevronDown, Search, X, CreditCard, Gamepad, HelpCircle, } from "lucide-react"; const faqData = { general: [ { question: "How do I get started?", answer: "Simply choose your game server, select a plan, and your server will be instantly deployed. Our control panel makes setup easy and intuitive.", }, { question: "Do you offer 24/7 support?", answer: "Yes, our support team is available 24/7 through live chat, ticket system, and Discord. We typically respond within 5 minutes.", }, { question: "What locations do you offer?", answer: "Currently live in Phoenix, AZ, with new nodes planned for NYC, Germany, and beyond. We’re building a global network focused on low-latency, high-uptime performance for gamers everywhere.", }, ], billing: [ { question: "What payment methods do you accept?", answer: "We accept all major credit cards and PayPal. All payments are processed securely.", }, { question: "Do you offer refunds?", answer: "Yes, we offer a 48-hour refund policy. Refunds are granted for valid reasons within this time frame. After 48 hours, refunds are no longer available. Please note that each client is eligible for one refund every six months.", }, { question: "Can I upgrade my plan anytime?", answer: "Yes, you can upgrade or your plan at any time. Changes take effect immediately and billing is prorated.", }, ], gameServers: [ // { // question: "How do I install mods?", // answer: // "Our control panel features one-click mod installation for popular modpacks. You can also manually upload mods through FTP.", // }, { question: "What's the minimum RAM recommended?", answer: "For Minecraft, we suggest 2GB for every 10 players. Other games vary.", }, { question: "Do you provide DDoS protection?", answer: "Yes, all servers include enterprise-grade DDoS protection up to 17Tbps at no extra cost.", }, ], }; const tabs = [ { id: "general", label: "General", icon: HelpCircle }, { id: "billing", label: "Billing", icon: CreditCard }, { id: "gameServers", label: "Game Servers", icon: Gamepad }, ]; const FAQItem = ({ question, answer, isOpen, onToggle }) => { return (
{answer}
); }; export const FAQ = () => { const [activeTab, setActiveTab] = useState("general"); const [expandedQuestions, setExpandedQuestions] = useState([]); const [searchQuery, setSearchQuery] = useState(""); const handleToggleQuestion = (id) => { setExpandedQuestions((prev) => prev.includes(id) ? prev.filter((item) => item !== id) : [...prev, id] ); }; const filteredQuestions = searchQuery ? faqData[activeTab].filter( (item) => item.question.toLowerCase().includes(searchQuery.toLowerCase()) || item.answer.toLowerCase().includes(searchQuery.toLowerCase()) ) : faqData[activeTab]; return (

Frequently Asked Questions

Find answers to common questions about our services

{/* Search Bar */}
setSearchQuery(e.target.value)} className="w-full bg-transparent text-white pl-12 pr-12 py-3 rounded-md focus:outline-none" /> {searchQuery && ( )}
{/* Tabs */}
{tabs.map((tab) => { const Icon = tab.icon; return ( ); })}
{/* FAQ Items */}
{filteredQuestions.map((item, index) => ( handleToggleQuestion(`${activeTab}-${index}`)} /> ))} {filteredQuestions.length === 0 && (

No questions found matching your search.

)}
); }; export default FAQ;