import QuizAnswerer from "@/components/QuizAnswerer";
import { Dialog } from "@mui/material";


interface Props {
    open?: boolean;
    quizId: string;
    onClose?: () => void;
}

export default function QuizDialog({ open = true, quizId, onClose }: Props) {

    return (
        <Dialog
            open={open}
            onClose={onClose}
            keepMounted
            PaperProps={{
                sx: {
                    backgroundColor: "transparent",
                    width: "calc(min(100%, max(70%, 700px)))",
                    height: "80%",
                    maxWidth: "100%",
                    m: "16px",
                }
            }}
        >
            <QuizAnswerer
                quizId={quizId}
                changeFaviconAndTitle={false}
                disableGlobalCss
            />
        </Dialog>
    );
}
