import type { Metadata } from 'next';

// FAQ Page structured data
const faqSchema = {
  '@context': 'https://schema.org',
  '@type': 'FAQPage',
  mainEntity: [
    {
      '@type': 'Question',
      name: 'What is Spanglish?',
      acceptedAnswer: {
        '@type': 'Answer',
        text: 'Spanglish is a language exchange community in Asunción, Paraguay. We organize monthly events where Spanish and English speakers come together to practice languages, meet new people, and have fun in a relaxed social environment.',
      },
    },
    {
      '@type': 'Question',
      name: 'Who can attend Spanglish events?',
      acceptedAnswer: {
        '@type': 'Answer',
        text: 'Anyone interested in practicing English or Spanish is welcome! We accept all levels - from complete beginners to native speakers. Our events are designed to be inclusive and welcoming to everyone.',
      },
    },
    {
      '@type': 'Question',
      name: 'How do language exchange events work?',
      acceptedAnswer: {
        '@type': 'Answer',
        text: 'Our events typically last 2-3 hours. You will be paired with people who speak the language you want to practice. We rotate partners throughout the evening so you can meet multiple people. There are also group activities and free conversation time.',
      },
    },
    {
      '@type': 'Question',
      name: 'Do I need to speak the language already?',
      acceptedAnswer: {
        '@type': 'Answer',
        text: 'Not at all! We welcome complete beginners. Our events are structured to support all levels. Native speakers are patient and happy to help beginners practice.',
      },
    },
  ],
};

export const metadata: Metadata = {
  title: 'Frequently Asked Questions',
  description: 'Find answers to common questions about Spanglish language exchange events in Asunción. Learn about how events work, who can attend, and more.',
  openGraph: {
    title: 'Frequently Asked Questions – Spanglish',
    description: 'Find answers to common questions about Spanglish language exchange events in Asunción.',
  },
};

export default function FAQLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(faqSchema) }}
      />
      {children}
    </>
  );
}
