import type { Metadata } from 'next';
import './globals.css';
import { LanguageProvider } from '@/context/LanguageContext';
import { CartProvider } from '@/context/CartContext';
import { AuthProvider } from '@/context/AuthContext';
import { WishlistProvider } from '@/context/WishlistContext';
import { CompareProvider } from '@/context/CompareContext';

export const metadata: Metadata = {
  title: 'Fast Time Phone – Mobile & Tech Shop | Kuwait',
  description: 'Kuwait\'s premier mobile and tech store. Shop the latest smartphones, accessories, tablets, smartwatches and gaming gear. Fast delivery across Kuwait.',
  keywords: 'mobile phones kuwait, smartphones kuwait, iphone kuwait, samsung kuwait, fast time phone, tech shop kuwait',
  openGraph: {
    title: 'Fast Time Phone – Mobile & Tech Shop',
    description: 'Kuwait\'s #1 premium mobile & tech store',
    type: 'website',
    locale: 'en_KW',
    images: ['/logo.png'],
  },
  manifest: '/manifest.json',
};

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en" dir="ltr">
      <head>
        <link rel="icon" href="/logo.png" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5" />
        <meta name="theme-color" content="#00D1FF" />
      </head>
      <body>
        <AuthProvider>
          <LanguageProvider>
            <CartProvider>
              <WishlistProvider>
                <CompareProvider>
                  {children}
                </CompareProvider>
              </WishlistProvider>
            </CartProvider>
          </LanguageProvider>
        </AuthProvider>
      </body>
    </html>
  );
}
