import type { Metadata } from "next";
import "@/styles/globals.css";
import { SiteHeader } from "@/components/SiteHeader";
import { ThemeProvider } from "@/components/ThemeProvider";
import { AppProviders } from "@/components/providers/AppProviders";
import { ColorModeProvider } from "@/components/providers/ColorModeProvider";

export const metadata: Metadata = {
  title: "Torbatyar — SuperApp Platform",
  description: "پلتفرم SaaS چندسرویسی با SSO یکپارچه",
};

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="fa" dir="rtl" suppressHydrationWarning>
      <body className="min-h-screen bg-[var(--canvas)] text-secondary antialiased">
        <ThemeProvider>
          <ColorModeProvider>
            <AppProviders>
              <SiteHeader />
              <main>{children}</main>
            </AppProviders>
          </ColorModeProvider>
        </ThemeProvider>
      </body>
    </html>
  );
}
