import { Inter } from "next/font/google"
import "./globals.css"
import { ThemeProvider } from "@/components/layout/theme-provider"
import { Toaster } from "sonner"
import type React from "react"
import { Metadata, Viewport } from "next"
import KeepOnlineWrapper from "@/components/layout/KeepOnlineWrapper"
import { NotificationProviderWrapper } from "@/components/layout/NotificationProviderWrapper"
// Christmas theme disabled
// import { ChristmasDecorations } from "@/components/christmas-decorations"
// import { isDecember } from "@/lib/utils/christmas"

const inter = Inter({ subsets: ["latin"] })
  
export const metadata: Metadata = {
  title: "Ember | E-Commerce Management Platform",
  description: "Transform your e-commerce experience with Ember, a comprehensive platform that integrates secure cryptocurrency payments, efficient order management, and advanced analytics to help you optimize performance, boost sales, and expand your customer base",
  keywords: "e-commerce, marketplace, cryptocurrency payments, order management, vendor platform, online business",
  authors: [{ name: "Ember" }],
  creator: "Ember ",
  publisher: "Ember",
  generator: "Next.js",
  applicationName: "Ember",
  referrer: "origin-when-cross-origin",
  formatDetection: {
    email: false,
    address: false,
    telephone: false,
  },
  robots: {
    index: false,
    follow: false,
    googleBot: {
      index: true,
      follow: true,
      "max-image-preview": "large",
      "max-video-preview": -1,
      "max-snippet": -1,
    },
  },
  openGraph: {
    title: "Ember | E-Commerce Management Platform",
    description: "Transform your e-commerce experience with Ember, a comprehensive platform that integrates secure cryptocurrency payments, efficient order management, and advanced analytics to help you optimize performance, boost sales, and expand your customer base",
    siteName: "Ember",
    locale: "en_GB",
    type: "website",
    images: [
      {
        url: "/og-image.jpg",
        width: 1200,
        height: 630,
        alt: "Ember - Streamlined E-commerce Management",
      },
    ],
  },
}

export const viewport: Viewport = {
  width: "device-width",
  initialScale: 1,
  maximumScale: 3,
  userScalable: true,
  viewportFit: "cover",
  themeColor: [
    { media: "(prefers-color-scheme: dark)", color: "#000000" },
    { media: "(prefers-color-scheme: light)", color: "#D53F8C" },
  ],
};

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  const isDec = false // Christmas theme disabled
  
  return (
    <html lang="en" suppressHydrationWarning className="dark">
      <body className={inter.className}>
        <ThemeProvider attribute="class" defaultTheme="dark" enableSystem disableTransitionOnChange>
          <NotificationProviderWrapper>
            {/* Christmas decorations disabled */}
            <Toaster 
              theme="dark" 
              richColors 
              position="top-right" 
            />
            <KeepOnlineWrapper />
            {children}
          </NotificationProviderWrapper>
        </ThemeProvider>
      </body>
    </html>
  )
}