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

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

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