import type { Metadata } from 'next';

export const metadata: Metadata = {
  title: 'The Integration Room — AV Beat',
  description: 'The Integration Room: connect with pro AV integrators, live production engineers, and display tech specialists worldwide. Discuss AV-over-IP, control systems, projection & display, audio engineering, conferencing, AI automation, and more.',
  alternates: { canonical: '/forum' },
  openGraph: {
    title: 'The Integration Room — AV Beat',
    description: 'The Integration Room: connect with pro AV integrators, live production engineers, and display tech specialists worldwide. Ask questions, share expertise, and discuss AV technology.',
    url: '/forum',
    type: 'website',
  },
  twitter: {
    card: 'summary',
    title: 'The Integration Room — AV Beat',
    description: 'The Integration Room: connect with pro AV integrators, live production engineers, and display tech specialists worldwide on AV Beat.',
  },
};

export default function ForumLayout({ children }: { children: React.ReactNode }) {
  const schema = {
    '@context': 'https://schema.org',
    '@type': 'WebPage',
    name: 'AV Beat — The Integration Room',
    description: 'The Integration Room: an industry community for pro AV integrators, live production engineers, and display tech professionals worldwide.',
    url: 'https://avbeat.com/forum',
    isPartOf: {
      '@type': 'WebSite',
      name: 'AV Beat',
      url: 'https://avbeat.com',
    },
    breadcrumb: {
      '@type': 'BreadcrumbList',
      itemListElement: [
        { '@type': 'ListItem', position: 1, name: 'Home', item: 'https://avbeat.com' },
        { '@type': 'ListItem', position: 2, name: 'The Integration Room', item: 'https://avbeat.com/forum' },
      ],
    },
  };

  return (
    <>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
      />
      {children}
    </>
  );
}
