import type { Metadata } from 'next'
import './globals.css'
import { LanguageProvider } from '@/lib/LanguageContext'
import { ThemeProvider } from '@/lib/ThemeContext'
import { AlertsProvider } from '@/lib/AlertsContext'
import { AlertsB2BProvider } from '@/lib/AlertsB2BContext'
import { MessagesProvider } from '@/lib/MessagesContext'
import { ActivityProvider } from '@/lib/ActivityContext'
import { NativeLanguageProvider } from '@/lib/NativeLanguageContext'

export const metadata: Metadata = {
  title: 'BreakPilot Studio v2',
  description: 'Lehrer-Plattform für Korrektur, Arbeitsblaetter und mehr',
}

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="de">
      <body>
        <ThemeProvider>
          <LanguageProvider>
            <AlertsProvider>
              <AlertsB2BProvider>
                <MessagesProvider>
                  <ActivityProvider>
                    <NativeLanguageProvider>
                      {children}
                    </NativeLanguageProvider>
                  </ActivityProvider>
                </MessagesProvider>
              </AlertsB2BProvider>
            </AlertsProvider>
          </LanguageProvider>
        </ThemeProvider>
      </body>
    </html>
  )
}
