// src/routes/__root.tsx
import { Outlet, createRootRoute } from "@tanstack/react-router";
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
import { useAccountStore } from "@/contexts/AccountContext";
import { MainMenu } from "@/components/main-menu/main-menu";

export const Route = createRootRoute({
	component: RootLayout,
});

function RootLayout() {
	const { userId } = useAccountStore();

	return (
		<div className="flex h-screen">
			{userId && <MainMenu />}

			<div className="flex flex-col flex-1">
				<div className="flex-1 overflow-hidden">
					<Outlet />
				</div>
			</div>

			{/* <TanStackRouterDevtools /> */}
		</div>
	);
}
