import { useState, useMemo } from 'react'; import { motion, AnimatePresence } from 'motion/react'; import { Search, ChevronDown, ChevronUp } from 'lucide-react'; import { Input } from './ui/input'; import { Badge } from './ui/badge'; import { Card, CardContent } from './ui/card'; import Navbar from './Navbar'; // import { CitySubmenu } from './CitySubmenu'; import { Footer } from './Footer'; import { MobileAppSection } from './MobileAppSection'; import { WhyChooseCityCards } from './WhyChooseCityCards'; import { EnhancedTestimonials } from './EnhancedTestimonials'; import { ReviewsSection } from './ReviewsSection'; interface User { email: string; name: string; } interface FAQPageProps { onBackClick: () => void; onHomeClick: () => void; onMelbourneClick: () => void; onPassesClick: () => void; onCheckoutClick: () => void; onSignInClick: () => void; onSignOutClick: () => void; onAttractionsClick: () => void; onBlogsClick: () => void; onHowItWorksClick: () => void; onFAQClick: () => void; onPrivacyPolicyClick: () => void; onAboutUsClick: () => void; onProfileClick: () => void; onCityCardsClick: () => void; onMagicItineraryClick: () => void; onPostCardsClick: () => void; onOffersClick: () => void; onContactUsClick?: () => void; onEsimsClick?: () => void; onHotelDiscountsClick?: () => void; currentPage: string; user: User | null; } interface FAQItem { id: string; question: string; answer: string; category: string; } const categories = [ 'General', 'Bookings', 'Passes', 'Mobile App', 'Payment', 'Cancellation', 'Support' ]; const faqData: FAQItem[] = [ { id: '1', question: 'How can I book my CityCards pass?', answer: 'You can easily book your CityCards pass through our website or mobile app. Simply select your preferred city, choose between our Selective or Unlimited pass options, and complete your purchase with instant digital delivery. Your pass will be available immediately for use.', category: 'Bookings' }, { id: '2', question: 'What\'s the difference between Selective and Unlimited passes?', answer: 'Our Flexi Pass allows you to choose specific attractions you want to visit, perfect for targeted exploration. The Unlimited pass gives you access to all participating attractions in the city during your pass validity period, ideal for comprehensive city discovery.', category: 'Passes' }, { id: '3', question: 'How do I use my digital pass at attractions?', answer: 'Simply show your digital pass on your mobile device at the attraction entrance. Each pass includes a unique QR code that attraction staff will scan for quick and easy entry. No printed tickets required - it\'s all digital and hassle-free.', category: 'Mobile App' }, { id: '4', question: 'Can I cancel or refund my CityCards pass?', answer: 'Yes, we offer flexible cancellation policies. Unused passes can be cancelled within 24 hours of purchase for a full refund. For passes used partially, refund eligibility depends on the specific terms of your pass type and usage.', category: 'Cancellation' }, { id: '5', question: 'Which cities are currently available?', answer: 'We currently offer comprehensive CityCards experiences in Melbourne, with more exciting destinations coming soon. Each city features carefully curated attractions, local experiences, and insider recommendations to help you make the most of your visit.', category: 'General' }, { id: '6', question: 'What payment methods do you accept?', answer: 'We accept all major credit cards (Visa, Mastercard, American Express), PayPal, Apple Pay, and Google Pay. All transactions are secured with industry-standard encryption to protect your payment information.', category: 'Payment' }, { id: '7', question: 'How long are CityCards passes valid?', answer: 'Pass validity varies by type and city. Most passes are valid for 30 days from the date of first use, giving you plenty of flexibility to explore at your own pace. Check your specific pass details for exact validity periods.', category: 'Passes' }, { id: '8', question: 'Do I need an internet connection to use my pass?', answer: 'While an internet connection is recommended for the best experience, our mobile app includes offline functionality. You can download your pass and attraction information for offline use, ensuring access even without internet connectivity.', category: 'Mobile App' }, { id: '9', question: 'Can I share my pass with friends or family?', answer: 'CityCards passes are non-transferable and designed for individual use only. Each pass is linked to the purchaser\'s account and cannot be shared. For group visits, each person needs their own pass.', category: 'General' }, { id: '10', question: 'What if I have issues with my booking?', answer: 'Our customer support team is available 24/7 to help with any booking issues or questions. Contact us through the app, website chat, email, or phone, and we\'ll resolve your concern quickly and efficiently.', category: 'Support' }, { id: '11', question: 'Are there any additional fees or hidden costs?', answer: 'No hidden fees! The price you see is the price you pay. Your CityCards pass includes all listed attractions and experiences with no additional booking fees or surprise charges at the attractions.', category: 'Payment' }, { id: '12', question: 'How do I get customer support while traveling?', answer: 'Access 24/7 customer support directly through our mobile app, website chat, or by calling our support hotline. Our team is always ready to assist with any questions or issues during your city exploration.', category: 'Support' } ]; export function FAQPage({ onHomeClick, onMelbourneClick, onPassesClick, onCheckoutClick, onSignInClick, onSignOutClick, onAttractionsClick, onBlogsClick, onHowItWorksClick, onFAQClick, onPrivacyPolicyClick, onAboutUsClick, onProfileClick, onCityCardsClick, onMagicItineraryClick, onPostCardsClick, onOffersClick, onContactUsClick, onEsimsClick, onHotelDiscountsClick, currentPage, user }: FAQPageProps) { const [searchQuery, setSearchQuery] = useState(''); const [selectedCategory, setSelectedCategory] = useState('All'); const [expandedFAQs, setExpandedFAQs] = useState>(new Set()); const toggleFAQ = (id: string) => { const newExpanded = new Set(expandedFAQs); if (newExpanded.has(id)) { newExpanded.delete(id); } else { newExpanded.add(id); } setExpandedFAQs(newExpanded); }; const filteredFAQs = useMemo(() => { return faqData.filter(faq => { const matchesSearch = faq.question.toLowerCase().includes(searchQuery.toLowerCase()) || faq.answer.toLowerCase().includes(searchQuery.toLowerCase()); const matchesCategory = selectedCategory === 'All' || faq.category === selectedCategory; return matchesSearch && matchesCategory; }); }, [searchQuery, selectedCategory]); // Group FAQs into pairs for 2-column layout const faqPairs = []; for (let i = 0; i < filteredFAQs.length; i += 2) { faqPairs.push(filteredFAQs.slice(i, i + 2)); } return (
{/* Navigation */} {}} onHomeClick={onHomeClick} onSignInClick={onSignInClick} onPassesClick={onPassesClick} onCheckoutClick={onCheckoutClick} onAttractionsClick={onAttractionsClick} onBlogsClick={onBlogsClick} onHowItWorksClick={onHowItWorksClick} onFAQClick={onFAQClick} onPrivacyPolicyClick={onPrivacyPolicyClick} onAboutUsClick={onAboutUsClick} onProfileClick={onProfileClick} onCityCardsClick={onCityCardsClick} onMagicItineraryClick={onMagicItineraryClick} onPostCardsClick={onPostCardsClick} onOffersClick={onOffersClick} currentPage={currentPage} isUserSignedIn={!!user} user={user} /> {/* {}} onHomeClick={onHomeClick} onMelbourneClick={onMelbourneClick} onAttractionsClick={onAttractionsClick} onPassesClick={onPassesClick} onBlogsClick={onBlogsClick} onHowItWorksClick={onHowItWorksClick} /> */}
{/* Page Header */} GET STARTED NOW

Frequently Asked{' '} Questions

Find answers to the most common questions about CityCards, bookings, and your city exploration experience

{/* Search and Filter Section */} {/* Search Bar */}
setSearchQuery(e.target.value)} className="pl-12 pr-4 py-6 text-lg bg-white border-2 border-gray-200 rounded-2xl focus:border-primary focus:ring-4 focus:ring-primary/10 transition-all duration-200" />
{/* Category Tags */}
setSelectedCategory('All')} > All {categories.map((category) => ( setSelectedCategory(category)} > {category} ))}
{/* FAQ Content */}
{faqPairs.length === 0 ? (

No questions found matching your search.

) : (
{faqPairs.map((pair, pairIndex) => ( {pair.map((faq) => { const isExpanded = expandedFAQs.has(faq.id); return (
{/* Answer Content */} {isExpanded && (

{faq.answer}

)}
); })} {/* If odd number of FAQs, add empty space for the last row */} {pair.length === 1 && (
)} ))}
)}
{/* Pagination Section */}
Showing 1-12 of 24 item(s)
{/* Mobile App Section */}
{/* Subtle Background Elements */}
{/* Why Choose Us Section */} {/* Enhanced Testimonials Section */} {/* Customer Reviews Section */} {/* Contact Support Section */}

Still have questions?

Our support team is available 24/7 to help you with any questions or concerns about your CityCards experience.

); } export default FAQPage;