import { useMessage } from "@/components/MySnackbar";
// import usePass from "@/hooks/usePass";
import { operation, route } from "@/router";
import { Button } from "@mui/material";
import { Box } from "@mui/system";
import { useEffect } from "react";

const Demo = ({
	childrenRoutes,
}: {
	childrenRoutes?: Array<route | operation>;
}) => {
	const message = useMessage();
	// const isPass = usePass();

	useEffect(() => {
		// console.log(isPass("PROJECT_OVERIVEW_CREATE"), "11111111111");
		// console.log(isPass("PROJECT_SUMMARY_MEMBER"), "2222222");
		// console.log(isPass("test"), "33333");
		// eslint-disable-next-line react-hooks/exhaustive-deps
	}, []);

	return (
		<Box>
			<Box>{JSON.stringify(childrenRoutes)}</Box>
			<Box>{JSON.stringify(process.env.NODE_ENV)}</Box>
			<Button onClick={() => message.success("测试测试")}>message测试</Button>
		</Box>
	);
};

export default Demo;
