import { getSession } from '@/lib/auth';
import { Sidebar } from './components/Sidebar';
import '../globals.css';

export default async function AdminLayout({ children }: { children: React.ReactNode }) {
  const session = await getSession();

  return (
    <html lang="tr">
      <body className="min-h-screen bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-50 flex">
        {session && <Sidebar />}
        <main className="flex-1 overflow-x-hidden p-6 md:p-8">
          <div className="max-w-6xl mx-auto">
            {children}
          </div>
        </main>
      </body>
    </html>
  );
}
