import { createFileRoute, Outlet } from "@tanstack/react-router";
import { checkUserAccess } from "../../../lib/authClient";

export const Route = createFileRoute("/_app/_adminLayout")({
	beforeLoad: async () =>
		checkUserAccess({
			allowedRoles: ["admin", "systemAdmin"],
			moduleName: "admin", // optional
		}),
	component: RouteComponent,
});

function RouteComponent() {
	return (
		<div>
			<Outlet />
		</div>
	);
}
