"use client";

import { MainNav } from "@/components/main-nav";
import { AuthCheck } from "@/components/auth/auth-check";
import { Toaster } from "@/components/ui/toaster";

interface LayoutWrapperProps {
  children: React.ReactNode;
  isSignInPage: boolean;
  isAuthenticated: boolean;
}

export function LayoutWrapper({
  children,
  isSignInPage,
  isAuthenticated,
}: LayoutWrapperProps) {
  if (isSignInPage) {
    return <>{children}</>;
  }

  return (
    <AuthCheck>
      <div className="min-h-screen bg-black">
        <nav className="h-16 bg-black/20 px-4">
          {!isSignInPage && isAuthenticated && <MainNav />}
        </nav>
        <main className="h-[calc(100vh-4rem)]">
          {children}
        </main>
      </div>
      <Toaster />
    </AuthCheck>
  );
} 