// src/pages/Dashboard

import * as React from "react";
import { Box, CssBaseline, Typography } from "@mui/material";

import {
	chartsCustomizations,
	dataGridCustomizations,
	datePickersCustomizations,
	treeViewCustomizations,
} from "./theme/customizations";
import AppTheme from "../../shared-theme/AppTheme";
import MainGrid from "../../components/MainGrid/mainGrid";


const xThemeComponents = {
	...chartsCustomizations,
	...dataGridCustomizations,
	...datePickersCustomizations,
	...treeViewCustomizations,
};

interface DashboardProps {
	disableCustomTheme?: boolean;
}

const Dashboard: React.FC<DashboardProps> = ({
	disableCustomTheme = false,
}) => {
	return (
		<AppTheme
			{...{ disableCustomTheme }}
			themeComponents={xThemeComponents}
		>
			<CssBaseline enableColorScheme />
			{!disableCustomTheme ? (
				<>
					<MainGrid />
				</>
			) : (
				<Box
					sx={{
						display: "flex",
						justifyContent: "center",
						alignItems: "center",
						backgroundColor: "#202020",
						height: "100vh",
						textAlign: "center",
						padding: 2,
					}}
				></Box>
			)}
		</AppTheme>
	);
};

export default Dashboard;
