import type { Metadata } from 'next';

const BASE_URL = 'https://ayrisai.xyz';

export const metadata: Metadata = {
  title: 'YouTube Lessons & Source Code | ayris.tech',
  description:
    'Browse all ayris.tech YouTube tutorial source code, lesson notes, starter packages, and project downloads. Covering Next.js, React, Python, TypeScript, Tailwind CSS, AI, and more.',
  keywords: [
    'Next.js tutorial source code', 'React tutorial download',
    'YouTube code resources', 'TypeScript tutorial',
    'Tailwind CSS examples', 'full-stack web development',
    'ayris.tech YouTube', 'Python AI tutorial',
  ],
  alternates: {
    canonical: `${BASE_URL}/en/lessons`,
  },
  openGraph: {
    title: 'YouTube Lessons & Source Code | ayris.tech',
    description: 'Download source code and browse lesson notes for every ayris.tech YouTube tutorial.',
    url: `${BASE_URL}/en/lessons`,
    type: 'website',
  },
};

export default function LessonsLayout({ children }: { children: React.ReactNode }) {
  return (
    <>
      {/* WebSite + ItemList Schema for lesson listing */}
      <script
        type="application/ld+json"
        suppressHydrationWarning
        dangerouslySetInnerHTML={{
          __html: JSON.stringify({
            '@context': 'https://schema.org',
            '@type': 'CollectionPage',
            name: 'YouTube Lessons & Source Code — ayris.tech',
            description:
              'Source code, lesson notes, and project downloads for every ayris.tech YouTube tutorial.',
            url: `${BASE_URL}/en/lessons`,
            publisher: {
              '@type': 'Person',
              name: 'ayris.tech',
              url: BASE_URL,
            },
          }),
        }}
      />
      {children}
    </>
  );
}
