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

export const Route = createRootRoute({
	component: () => <RootLayout />,
});
const RootLayout = observer(() => {
	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>
	);
});
