import { useState } from 'react'; import { Link } from 'react-router-dom'; import { Check } from 'lucide-react'; interface Plan { id: string; name: string; description: string; pricing: { monthly: number; annually: number; }; features: string[]; isPopular?: boolean; } const plans: Plan[] = [ { id: 'basic', name: 'Basic', description: 'For occasional drivers who need a car for a few days per month.', pricing: { monthly: 399, annually: 4199, }, features: [ 'Up to 3 days per month', 'Access to Model 3 and Model Y', 'Basic insurance coverage', 'Charging included', 'Mileage limit: 1,000 miles/month', 'Roadside assistance', ], }, { id: 'premium', name: 'Premium', description: 'For regular drivers who need more flexibility and premium vehicles.', pricing: { monthly: 799, annually: 8599, }, features: [ 'Up to 9 days per month', 'Access to all Tesla models', 'Full insurance coverage', 'Charging included', 'Mileage limit: 2,500 miles/month', 'Roadside assistance', 'Priority customer support', 'Flexible scheduling', ], isPopular: true, }, { id: 'unlimited', name: 'Unlimited', description: 'For those who want unrestricted access to our entire fleet.', pricing: { monthly: 1499, annually: 15999, }, features: [ 'Unlimited access (30 days/month)', 'Access to all Tesla models including Cybertruck', 'Full insurance coverage', 'Unlimited charging', 'Unlimited mileage', 'Roadside assistance', 'Premium customer support', 'Flexible scheduling', 'Vehicle delivery and pickup', 'Exclusive event invitations', ], }, ]; const faqItems = [ { question: 'How does the subscription work?', answer: 'Our subscription plans give you access to Tesla vehicles for a fixed monthly or annual fee. Choose your plan based on how often you need a car, select your preferred vehicle, and we'll handle the rest.' }, { question: 'Can I switch between different Tesla models?', answer: 'Yes! Depending on your plan, you can switch between different Tesla models. Premium and Unlimited members have access to our entire fleet and can change vehicles up to twice per month.' }, { question: 'What does the insurance cover?', answer: 'Our basic insurance covers liability and collision with a deductible. Premium and Unlimited plans include comprehensive coverage with a lower deductible, protecting you from almost any incident.' }, { question: 'Is charging included in the subscription?', answer: 'Yes, charging is included in all subscription plans. Basic and Premium plans include charging at Tesla Superchargers and partner network stations, while Unlimited includes home charging equipment installation.' }, { question: 'How do I cancel my subscription?', answer: 'You can cancel your subscription anytime through your account dashboard. Monthly subscriptions can be canceled with a 7-day notice, while annual subscriptions can be canceled with a 30-day notice with prorated refunds.' } ]; const PricingPage = () => { const [billingCycle, setBillingCycle] = useState<'monthly' | 'annually'>('monthly'); const [expandedFaqIndex, setExpandedFaqIndex] = useState(null); const toggleFaq = (index: number) => { setExpandedFaqIndex(expandedFaqIndex === index ? null : index); }; return (
{/* Header */}

Choose Your Membership Plan

Flexible plans designed to fit your lifestyle. Subscribe monthly or annually for the best value.

{/* Billing Toggle */}
{/* Pricing Cards */}
{plans.map((plan) => (
{plan.isPopular && (
Most Popular
)}

{plan.name}

{plan.description}

${billingCycle === 'monthly' ? plan.pricing.monthly : plan.pricing.annually} /{billingCycle === 'monthly' ? 'month' : 'year'}
Choose Plan

What's included:

    {plan.features.map((feature, index) => (
  • {feature}
  • ))}
))}
{/* FAQ Section */}

Frequently Asked Questions

{faqItems.map((faq, index) => (
{expandedFaqIndex === index && (

{faq.answer}

)}
))}
); }; export default PricingPage;