import { ReactNode } from "react";
import BaseLayout from "@/components/Layout/BaseLayout";
import { routing } from "@/i18n/routing";
import UnauthenticatedLayout from "@/components/Layout/UnauthenticatedLayout";
import AuthGuard from "@/components/guards/AuthGuard";

type Props = {
	children: ReactNode;
};

export default function RootLayout({ children }: Props) {
	return (
		<BaseLayout locale={routing.defaultLocale}>
			<AuthGuard>
				<UnauthenticatedLayout>{children}</UnauthenticatedLayout>
			</AuthGuard>
		</BaseLayout>
	);
}
