import './globals.css'
import { Inter } from 'next/font/google'


import { headers } from 'next/headers';
import { AuthProvider } from "@/components/providers/auth-provider";// import SigninButton from "@/components/signinbutton";

const inter = Inter({ subsets: ['latin'] })

export const metadata = {
  title: 'Integrated ebiziner system',
  description: '',
}

import { ReactNode } from 'react';

export default async function RootLayout({ children }: { children: ReactNode }) {
  const headersList = headers();
  // read the custom x-url header
  const header_url = (await headersList).get('x-url') || "";
  console.log('header_url: ',header_url);
  const conditionClass = ((header_url === '/' || header_url === '') ? '' : 'dark');
  return (
    <html lang="en" dir="ltr">
      <body className={`font-primary ${conditionClass}`}>
      
        <AuthProvider>
       
        
          {children}
        </AuthProvider>
      </body>
    </html>
  )
}
