import React from "react";
import { Box } from "@mui/material";
import Spinner from "react-bootstrap/Spinner";

const LoadingContainer = ({ loadingText }) => {
  const LoadingContainerStyle = {
    backgroundColor: "rgba(0,0,0,0.5)",
    overflow: "auto",
  };

  return (
    <>
      <Box
        className="d-flex justify-content-center position-absolute w-100 h-100 align-items-center"
        style={LoadingContainerStyle}
      >
        <Spinner animation="border" variant="light" role="status">
          <span className="visually-hidden">Loading...</span>
        </Spinner>
      </Box>
    </>
  );
};

export default LoadingContainer;
