import {useNavigate} from 'react-router-dom';
import {LandingNav} from '@/components/landing/landing-nav';
import {LandingFooter} from '@/components/landing/landing-footer';

interface LandingLayoutProps {
    children: React.ReactNode;
}

export function LandingLayout({children}: LandingLayoutProps) {
    const navigate = useNavigate();
    const handleRegister = () => navigate('/auth/register');

    return (
        <div className="min-h-screen bg-white dark:bg-zinc-950 text-zinc-900 dark:text-zinc-100 font-sans antialiased">
            <div
                className="fixed inset-0 bg-[linear-gradient(to_right,#09090b08_1px,transparent_1px),linear-gradient(to_bottom,#09090b08_1px,transparent_1px)] bg-[size:24px_24px] pointer-events-none"/>
            <LandingNav/>
            <main>{children}</main>
            <LandingFooter onRegister={handleRegister}/>
        </div>
    );
}
