import {Box, CircularProgress, Grid, Typography} from "@mui/material";
import {FormattedMessage} from "react-intl";

const LoadingComponent = ({disableText,alignItems}) => {
    return (
        <Grid item xs={12} md={12} lg={12} justifyContent="space-between" alignItems="center">
            <Box
                display="flex"
                justifyContent="center"
                alignItems="center"
                // autoHeight={true}
            >
                <Grid container direction="column" alignItems={alignItems?alignItems:"center"}>
                    <CircularProgress/>
                    {disableText?
                        null
                    :
                        <Typography variant="h5">
                            <FormattedMessage id="loading" />
                        </Typography>
                    }
                </Grid>

            </Box>
        </Grid>
        )
}
export default LoadingComponent;
